2
def getGuessedWord(secretWord, lettersGuessed):
secretWord_copy = ""
for i in secretWord:
print(i)
secretWord_copy = secretWord.replace(i," _ ")
print(secretWord_copy)
secretWord = 'apple'
I’m trying to replace every character of secretWord
by " - "but the above code only replaces the last:
Appl _
What is wrong?
The result should be _ _ _ _ _
The final result should be "_____"?
– Barbetta
@Barbetta: The result should be _ _ _ _ _
– Ed S