You are viewing a single comment's thread. Return to all comments →
Python 3
#!/bin/python3 import sys S = input().strip() try: line = int(S) except ValueError: print("Bad String") else: print(line)
ERROR: You should use exception handling concepts.
#!/bin/python3 import sys S = input().strip() try: print (int(S)) except ValueError: print ("Bad String")
All ok. LOL
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 →
Python 3
ERROR: You should use exception handling concepts.
All ok. LOL