So I have a function
guess_check(guess)
that is invoked by prompt()
function
Prompt()
invokes guess_check()
so that guess is a one work string
containing an alphabet character.
word is a variable = "placeholder"
Below is the code that I'm having trouble with:
if guess in word:
word.replace(guess, '*')
print word
If I make guess = "a" I would anticipate word = "pl*ceholder", but it doesn't change.
Why does the word variable not change, and how can I get it to change as I want?