title: Why does my code not replace the repeatd letters in aardvark and baboon example?
body: <p>Why does my code not replace the repeated
  letters in aardvark and baboon example??
  This an exercise for the hangman game !!</p>
  <pre><code>import random
  word_list = [&quot;aardvark&quot;, &quot;baboon&quot;, &quot;camel&quot;]
  chosen_word = random.choice(word_list)
  
  #Testing code
  print(f'Pssst, the solution is {chosen_word}.')
  display = []
  for letter in chosen_word:
         display.append(&quot;_&quot;)
  print(display)
  #TODO-1: - Create an empty List called display.
  #For each letter in the chosen_word, add a &quot;_&quot; to 'display'.
  #So if the chosen_word was &quot;apple&quot;, display should be [&quot;_&quot;, &quot;_&quot;, &quot;_&quot;, &quot;_&quot;, &quot;_&quot;] with 5 &quot;_&quot; representing each letter to guess.
  
  guess = input(&quot;Guess a letter: &quot;).lower()
  
  #TODO-2: - Loop through each position in the chosen_word;
  #If the letter at that position matches 'guess' then reveal that letter in the display at that position.
  #e.g. If the user guessed &quot;p&quot; and the chosen word was &quot;apple&quot;, then display should be [&quot;_&quot;, &quot;p&quot;, &quot;p&quot;, &quot;_&quot;, &quot;_&quot;].
  for letter in chosen_word:
      if letter == guess:
             index = chosen_word.index(letter)
             display[index] = letter
  print(display)
  #TODO-3: - Print 'display' and you should see the guessed letter in the correct position and every other letter replaced with &quot;_&quot;.
  #Hint - Don't worry about getting the user to guess the next letter. We'll tackle that in step 3.`enter code here`
  </code></pre>