def function(user):
options = get_options(user)
print(options)
user_input = input("please select option: ")
while user_input not in options:
user_input = input("please select option: ")
print(user_input)
If in the above code "options" is equal to a list of numbers, for example [80,90,100] why does the code not break when I input one of those values? The code should first print the list of numbers and then ask the user to select one of the numbers and repeat the same question until a valid response is given but I'm having trouble with the looping while statement that does not end. Also would like to print the valid number that the user gave at the end of the function.