Here is the function in question:
def single_letter_guess(guess,word):
global guessed_letters
global lives_remaining
if word.find(guess) == -1:
guessesLeft -= 0
guessed_letters = guessed_letters + guess.lower()
if all_letters_guessed(word):
return True
return False
The error is coming from the fourth line and displays :
if word.find(guess) == -1:
AttributeError: 'function' object has no attribute 'find'
I'm still pretty new to python and don't really know how to interpret this error message. It should technically be looking for the guessed letter in the string word. I can provide the full code if needed for more context.
wordis a function. How are you calling this function?