You are viewing a single comment's thread. Return to all comments →
If anyone is trying to solve this problem in Python3. Then use this code not the pre-defined code:
#!/bin/python3 import math import os import random import re import sys S = input().strip() try: print(int(S)) except ValueError: print("Bad String")
Seems like cookies are disabled on this browser, please enable them to open this website
Day 16: Exceptions - String to Integer
You are viewing a single comment's thread. Return to all comments →
If anyone is trying to solve this problem in Python3. Then use this code not the pre-defined code: