如何用字母替换破折号-Hangman

我正在尝试制作适合课堂的子手游戏,但我坚持使用正确猜出的字母替换破折号(-)。

就像这个单词很高兴并且用户猜到了字母p一样,因此它将用破折号代替字母,看起来像这样:--PP-

到目前为止,这是我的代码:

def play_game(secret_word):
guesses_left = 8
hangman_dash = len(secret_word) * "-"
while guesses_left > 0:
    print("The word now looks like this: " + (hangman_dash))
    print("You have " + str(guesses_left) + " guesses left")
    letter = input("Type a single letter, then press enter: ")
    letter = letter.upper()
    if len(letter) != 1:
        print("Please enter only one letter.")
    elif letter not in 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYXZ':
        print("Please guess a letter.")
    if letter in secret_word:
        print("That guess is correct")

    else:
        print("There are no {}'s in the word".format(letter))
        guesses_left = guesses_left - 1