Jun-04-2020, 02:26 PM
The find function returns the index of the first instance found. That's why it stops working after the first one is found. If it doesn't find an instance then it returns -1. What you need to do is keep running find in a loop until it returns -1.
Something like:
Something like:
while full_word.find(guess): selected_word = selected_word[:checker] + guess + selected_word[checker+1:]