I'm trying to make a hangman game, and I got a problem. When I try to check if a letter is in the chosen word, it won't work if there are two or more same letters. For example the word is WINDOW. If I choose the W as the guessing letter, it will only put the first one W, and if I try to guess W again, it will go to the first place again. I'm gonna leave the code below.
index = ANSWER.index(GUESTWORD)
BOARD[int(index)] = GUESTWORD
print(BOARD)
OUTPUT
> ['W', 'I', 'N', 'D', 'O', '__']
I tried all I could but I can't get the W to fill the both spaces at the same time. Thanks!!