samedi 11 avril 2020

Is there a way to connect multiple if statements to one else statements?

As a beginner to Python, I'm currently making a hangman game. I'm sure there is a much better way to do this, but for the time being, I want to try to create this with the skills I have. I have multiple if statements that I want to connect to a singular else statement. So if the input is not equal to any of the if statements, then I want to print a specific message. I've tried using elif statements but they don't work with words that have multiple of the same letter.

Aucun commentaire:

Enregistrer un commentaire