I am writing code for a hangman game in python and I need to know the index of some of the letters which are in a list.
Here is my code:
if answer in word:
check.append(answer)
if check[0]==answer:
print('u guessed one')
guessed.append(answer)
check.remove(check[0])
print('You have guessed',guessed)
I know that I have to find the position of the guessed letter but I don't know how..
Can someone help me?