python hangman not revealing letters
<p>I'm working on a Python version of hangman that works off of a .txt file wordlist. For some reason, in playthroughs after the initial playthrough, the script won't show certain letters. Everything else works the way I want it to, more or less.</p>

<p>My code:</p>

<pre><code>import random

wordlist = open("wordlist.txt").read().split()
word = random.choice(wordlist)
strikes = 0
hidden_letters = []
alphabet = "abcdefghijklmnopqrstuvwxyz"
guesses = []

def new_word():
    global word
    global guesses
    word = random.choice(wordlist)
    for letter in set(word):
        if letter in alphabet:
            hidden_letters.append(letter)
    guesses = []

def current_progress():
    for letter in word:
        if letter in hidden_letters:
            print '_',

        elif letter == ' ':
            print ' ',

        else:
            print letter,
    print "\n"

def play_again():
    global strikes
    print "Would you like to play again?"
    answer = raw_input("y/n: ")
    if answer == "y":
        strikes = 0
        main()
    elif answer == "n": exit(0)
    else:
        print "That's not a valid answer."
        play_again()

def letter_in_word(x):
    global strikes
    global hidden_letters
    if x in word:
        hidden_letters.remove(x)
        print "That letter is in the word."
        current_progress()
        if hidden_letters == []:
            print "You win!"
            play_again()
        else:
            print "You have %d strike(s)." % strikes

    elif not x in word:
        print "That letter is not in the word."
        current_progress()
        strikes = strikes + 1
        print "You have %d strike(s)." % strikes

def main():
    new_word()
    current_progress()
    global strikes
    while strikes &lt; 6 and not hidden_letters == []:
        print "Guess a letter. \n Letters that have been already guessed are:", guesses

        guess = raw_input("&gt; ")

        if guess in alphabet and len(guess) == 1:
            if not guess in guesses:
                guesses.append(guess)
                letter_in_word(guess)

            else:
                print "You've already guessed that letter. Pick another."
                current_progress()
                print "You have %d strikes." % strikes

        else:
            print "Sorry, that's not a valid guess."
            current_progress()
            print "You have %d strikes." % strikes

    if strikes == 6:
        print "Oop! You lose."
        print "The answer was:", word
        play_again()

print "Welcome to Hangman!"
print "Six strikes and you lose."
print "----------"      
main()
</code></pre>
