SyntaxFix
Write A Post
Hire A Developer
Questions
For Python 3 the following will work.
userInput = 0 while True: try: userInput = int(input("Enter something: ")) except ValueError: print("Not an integer!") continue else: print("Yes an integer!") break