How do i use while loop with variables : I want to loop between the choices that user has given as input and the choices are stored as variables, 

A = "A"

S = "S"
 
D = "D"
 
F = "F"

action_input = input("\n ")

action_input1 = action_input.title()

while (action_input1 not in [A, S, D, F]) :

    if action_input1 == A :

        print("\n Required Result is : " + str(Ac))

    elif action_input1 == S :
        
        print("\n Required Result is : " + str(Sc))

    elif action_input1 == D :
        
        print("\n Required Result is : " + str(Dc))

    elif action_input1 == F :
        
        print("\n Required Result is : " + str(Fc))

    else :

        print("\n Please enter from the choices given above")