if hint1 in ["yes", "y", "Y"]:
secretword = ""
for letter in Player1_secretword:
secretword += letter
print (secretword)
break
I am currently a beginner building a guessing game and this is the code I have writtern in order for the program to give hints as the player requires. The first time the player needs a hint the first letter of the word is supposed to come up, the second time the player asks for a hint the second letter comes up, so on and so forth.
when I run the code this is the output:
enter cwould you like a hint? (Y/N): yes
c
ca
cat
I want the program to just give "c" the first time and, when the player asks for a hint the second time to give "ca" and so on, is there any possible way for me to achieve this?