Your while
condition will be True
if UserHand
is any non-empty value, like 'a'
, or '3333'
, because of
UserHand or UserHand_Retry....
since or
needs only one of these to be True
and UserHand
will be evaluated as True
if it’s a non-empty string.
while UserHand not in ["Rock", "Paper", "Scissors"]:
Also, be careful with multiple or
and and
in your condition; that might work differently than you expected. Use (
and )
if you’re unsure.
7
solved I can’t fix an annoying error in my script [closed]