If Statement Always True (String)

后端 未结 4 1517
悲&欢浪女
悲&欢浪女 2021-01-28 17:32

I have here a rather simple rock, paper, scissors program where I am having some trouble with if statements. For some reason, when I enter rock, paper, or scissors (True Values)

4条回答
  •  不知归路
    2021-01-28 18:04

    if player not in {'rock', 'paper', 'scissors'}:
        print("That is not how you play rock, paper, scissors!")
    ...
    

提交回复
热议问题