lundi 23 octobre 2017

Why doesn't my if statement work when i add or [duplicate]

This question already has an answer here:

test = raw_input("one or two?")
if str(test) == "1" or "one":
    print "Is it working? ONE"
elif str(test) == "2" or "two":
    print "Is it working? TWO"

Whenever i write 2, it prints "Is it working? ONE" I don't understand why?

Aucun commentaire:

Enregistrer un commentaire