while True:
try:
imp = int(input("Importance:\n\t1: High\n\t2: Normal\n\t3: Low"))
# ... Do stuff dependant on "imp"
break # Only triggered if input is valid...
except ValueError:
print("Error: Invalid number")
Comments
Post a Comment