while turn < 10:
letter = str(input("Enter your guess: "))
if letter in randomword:
pos = randomword.find(letter)
word = word.replace(word[pos],letter,1)
print(word)
word
is a string like this "_ _ _ _ "
.
Why, in this loop, when the letter is in the random word, it gets printed in the beginning and not in the position word[pos]
?