You are viewing a single comment's thread. Return to all comments →
So, I'm doing this:
s = input() try: print(int(s)) except ValueError: print("Bad String")
It is literally the way to do it and Hackerank doesn't like it. I guess I'll be forever leaving this problem unsolved....
Day 16: Exceptions - String to Integer
You are viewing a single comment's thread. Return to all comments →
So, I'm doing this:
It is literally the way to do it and Hackerank doesn't like it. I guess I'll be forever leaving this problem unsolved....