dimanche 6 mai 2018

This If statement wont cooperate with my variable [duplicate]

Somehow, it always print out 'Yes'. Even if the input is 'Hello'. It will never go to the elif.

def commandFunction():
global command
while True:
    command = input(">>> ")
    commands(command)

def Action(c):
global command
if command == 'help' or 'Help' or 'HELP':
    print("Yes!")
elif command == 'hello':
    print("No!")

Aucun commentaire:

Enregistrer un commentaire