title: How to replace characters at a specified position (index) in a string?
body: <pre><code>while turn &lt; 10:
      letter = str(input(&quot;Enter your guess: &quot;))
      
      if letter in randomword:
          
          pos = randomword.find(letter)
          
          word = word.replace(word[pos],letter,1)
          print(word)
  </code></pre>
  <p><code>word</code> is a string like this <code>&quot;_ _ _ _ &quot;</code>.
  Why, in this loop, when the letter is in the random word, it gets printed in the beginning and not in the position <code>word[pos]</code>?</p>