So here is my question. I have a chunk of input code that I need to repeat in case the input is wrong. So far this is what I have (note that this is just an example code, the actual values I have in print and input are different:
input_var_1 = input("select input (1, 2 or 3)")
if input_var_1 == ("1"):
print ("you selected 1")
elif input_var_1 == ("2")
print ("you selected 2")
elif input_var_1 == ("3")
print (you selected 3")
else:
print ("please choose valid option")
What do I add after the ELSE so that all the code between the first IF and last ELIF gets repeated until the input is valid? What I have now is just plain repeat of the code 3 times, but the problem with that is that it repeats the input request only 3 times and that it's too large and impractical.
Thank you for your assistance!