title: how do I get my print function to "remember" my previous statement
body: <pre><code>import random
  
  word_list_easy = ["word", "apple", "banana", "cheese"]
  
  difficulty = str(input("Please enter difficulty: Easy, Medium or Hard. "))
  difficulty = difficulty.upper()
  empty = ("")
  
  if difficulty == ("EASY"):
      maximum = len(word_list_easy)
      maximum = maximum - 1
      #makes a random variable that cant excede the length of the list
      random = random.randint(0,maximum)
      random_word = word_list_easy[random]
      #chooses a random word in the list
      word_length = len(random_word)
  
      for i in range (word_length):
          #shows how many letters there are
          print("_", end=" ")
      print("There are ", word_length ,"letters in the word")
      #sets how many tries you get. (later will make graphical)
      tries = 5
      while tries &gt;= 1:
          #will repeat untill out of tries
          geussed_letter = input("Enter your geuss of the letter ")
          #sets geussed letter to nothing 
          while len(geussed_letter) &gt; 1:
                    geussed_letter = input("Enter one letter that you think is in the word ")
          while (geussed_letter) == (""):
              geussed_letter = input("Please enter a letter ")
                    #if the letter is in the word,
          if (geussed_letter) in (random_word):
              print("You geussed correctly")
              #finding the index of letter in word
  
              new_random_word = random_word.replace(geussed_letter, empty)
              new_len_word = len(random_word)
              #find the length of the new word to repeat the "_" lines for length of new word
              index_of_letter = random_word.find(geussed_letter)
              rest = len(new_random_word) - (index_of_letter)
              for i in range (index_of_letter):
                  print("_", end=" ")
              print(geussed_letter)
              for i in range (rest):
                  print("_", end=" ")
              print(" ", end="\n")
  
          else:
              print("Sorry but your geuss was wrong ")
              tries = tries - 1
              print("You have",tries," tries left")
  
          if (new_random_word) == (""):
              print("Congratulations, you geussed the correct word. It was ", random_word)
  
  </code></pre>
  
  <p>im trying to create a hangman game. its not done however I have multiple problems which I have difficulty fixing. First of all I would like <code>print("_" end=" ")</code> to output the previous guessed letter too instead of only the recent guessed letter. my other problem is that when the word is for example banana, the print statement only prints the first "a" if the a is guessed. I understand my title isn't very detailed but I wasn't sure how to word it. Thanks</p>