I need to replace a character in a string but here is the catch, the string will be all underscores and I need to be able to replace the underscore that corresponds to the index of the word. For example:
underscore = '___'
word = 'cow'
guess = input('Input the your letter guess') #user inputs the letter o for example
if guess in word:
underscore = underscore.replace('_',guess)
what i need to be fixed is that the underscore that gets replaced needs to be in the second place of the three underscores. I dont want underscore = 'o__' but rather '_o_'