This question already has an answer here:
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