0
for letra in palavra_secreta:
#print(inclui_Letras)
if (chute == letra):
letras_acertadas[index] = letra
inclui_Letras.append(letra) # incluir o 'chute' na list 'inclui_letras
print(palavra_secreta, chute, letra, inclui_Letras)
index += 1
I am using this code to check if there is a letter placed by the user in a word. However, let’s assume that my word is 'Strawberry' and I put the letter A. In this case it is all right, but... I repeat the letter A several times and I want to inform the user (print) that the said letter has already been placed.
In the above code I tried to add all the letters in the inclu_Letras tag, but the same one is only adding the last letter and so I can’t make a comparison.