vendredi 16 octobre 2020

Python if(xx) in list: [duplicate]

while True:
    first = input(" : ")
    first.split()
    if("cower" or "fear" or "wait" or "out" or "hide" or "Cower" or "Fear" or "Wait" or "Out") in first:
        print("You hide while all the chaos unfolds outside")

#The problem is that this code only checks the first word, if I type "cower" it will print, if I type anything else it will just ask for input again. #I was only using while True: to not have to reload every time I try the variables.

Aucun commentaire:

Enregistrer un commentaire