I'm making hangman in python and it works very simple:
secretWorld=list(input("secretWorld: "))
guess=str(input("guess: "))
if guess in secretWord:
ind=secretWord.index(guess)
contl[ind*2]=guess
print(contl)
But this changing underlines works only for the first letter e.g. secretWord="skill" guess="l" I will get _ _ _ l _ and I want _ _ _ l l