##Example 1 action = input("Please enter an action: ") while action!="go" and action!="look" and action!="take" and action!="drop" and action!="inventory" and action!="quit": print("Action not recognized. Try again.") action = input("Please enter an action: ") if action=="go" or action=="look" or action=="take" or action=="drop" or action=="inventory" or action=="quit": print("Let's do this!") ######################### ##Example 2 command = str(input("Please enter an action: ")) while command!="go" and command!="look" and command!="take" and command!="drop" and command!="inventory" and command!="quit": print("Action not recognized. Try again.") command = str(input("Please enter an action: ")) print("Let's do this!") ######################### ##Example 3 command=["go", "look", "take","drop", "inventory","quit"] action=input("Please enter an action: ") while not action in command: print("Try again") action=input("Please enter an action: ") print("Let's do this")