Jun-25-2018, 12:01 PM
I wrote a console hangman game a while ago as part of my learning, and came up with this approach:
After the above process,
msg = ''.join([c if c in guesses else '_' for c in word])where
guesses
contains all of the letters entered by the players so far and, of course, word
is the word they are trying to guess.After the above process,
found = msg == word
will indicate whether the player has guessed the word or not.
I am trying to help you, really, even if it doesn't always seem that way