title: Updating missing letters in hangman game
body: <p>I'm making a hangman game and have found a problem with my methodology for updating the answer. I have a variable that adds underscores equal to the amount of letters in the word the player needs to guess. However I can't figure out how to effectively update that when the player guesses a correct letter.</p>
  
  <p>Here is my code</p>
  
  <pre><code>import random
  '''
  HANGMAN IMAGE
  
  print(" _________     ")
  print("|         |    ")
  print("|         0    ")
  print("|        /|\\  ")
  print("|        / \\  ")
  print("|              ")
  print("|              ")
  '''
  
  def game():
      print('''Welcome to hangman, you must guess letters to fill in the word.
  Incorrect guesses will use up a turn, you have 7 turns before you lose.''')
      lines = open("wordBank.txt").read() 
      line = lines[0:] 
  
      words = line.split() 
      myword = random.choice(words).lower()
      letters = len(myword)
      print("Your word has " + str(letters) + " letters.")
  
      underscores = ""
      for x in range(0, letters):
          underscores += "_ "
      print(underscores)
      print(myword)
      l = set(myword)
      turn = 0
      guesses = []
      def guess():
          thisGuess = input("Type a letter and press Enter(Return) to guess: ")
          if thisGuess.lower() in l:
  
          else:
              print("Boo")
  
      guess()
  game()
  </code></pre>