I'm trying to code a simple python script which takes the input from user and continues, for now it has 3 options and just exit's if there's an invalid input.
My question is what should I add to reprint the options if the user input's anything other then the numbers 1-3 ?
def select():
option = raw_input("\nSelect an option:\n [1]First\n [2]Second\n [3]Third\n")
if option == '1':
print('Hello')
elif option == '2':
print('Hi')
elif option == '3':
print('Hey')
else:
exit(0)
(Code just for example)