I'm trying to make a simple rock, paper, scissors game but I can't get my if statement to work. Currently it accepts all values but in its previous format it wouldn't accept anything. How can I make it only accept these three values and reject other ones?
def game():
while True:
playerVal = str(input("Your turn: "))#player's turn
if playerVal == ("rock") or ("paper") or ("scissors"):
print("success")
compare()
break
else :
print("input a correct value")
game()