print_list=input("Do you wish to print list \n:")
if print_list == "yes":
    for item in List:
        print (item , "%2.f" %(Speed),"m/s")
elif print_list == "no":
    print ("Thank you")
if print_list != "yes" or "no":
    while True:
        print ("Invalid Input")
        break
this is what happened:
Do you wish to print list 
:hhh
Invalid Input
Press "Enter Key" when the vehicle passes Sensor 1 
:
What I was hoping was for the program to ask the question "Do you wish to print list", when the user input is invalid.
 
     
     
    