while not good_input:
    user_input = input('enter the right letter : ')
if user_input in list_of_good_values:
    good_input = user_input
Python: How to keep repeating a program until a specific input is obtained?