Skip to content

Instantly share code, notes, and snippets.

@mythmon
Created February 14, 2013 19:03
Show Gist options
  • Save mythmon/4955336 to your computer and use it in GitHub Desktop.
Save mythmon/4955336 to your computer and use it in GitHub Desktop.
x = None
while x is None:
try:
x = int(input("Please enter a number: "))
except ValueError:
print("Oops! That was no valid number. Try again...")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment