< I have the following code:
print("Options:")
print("Option 1")
print("Option 2")
print("Option 3")
print("Option 4")
choice = int(input("What would you like to choose [1,2,3,4]? "))
while choice not in ['1','2','3','4']:
choice = int(input("What would you like to choose [1,2,3,4]? "))
if not choice:
print: ("Please enter 1, 2, 3 or 4. ")
However, the output when running the module is:
What would you like to do [1,2,3,4]? 5 What would you like to do [1,2,3,4]?
I want this to loop until 1,2,3, or 4 is selected & produce the following output:
What would you like to do [1,2,3,4]? 7 Please enter 1, 2, 3 or 4.
What would you like to do [1,2,3,4]?
Where am I going wrong?