In a game of Hangman, if the hidden word is hello
and the player guesses l
then I need to find the index of both locations.
Example:
word = "hello"
guess = "l"
position = word.index(guess) #this helps me find the first one
I couldn't come up with any way to find the second. How am I able to do that?