I was making a small PYTHON 3 hangman project when I came across this problem:
if playAgain == 'yes' or 'y':
print('Ok!')
playAgain = True
else:
break
This was the code I wrote to ask the user to play again or not. However, it would register everything was yes, and make the user play again even if they put no. Please help, Thanks.
Aucun commentaire:
Enregistrer un commentaire