絞首刑執行人ゲームを作成しています。ライフをリセットしてスコアを元の値 (6&0) に戻せるようにしたいと考えています。このコードは機能していないようです。
def newwords():
    newgamewords.append(input('Enter new word: '))
    print('Do you want to add any more words? yes or no?')
    answer=input()
    if answer == 'yes':
        newwords()
    else:
        while len(guessedletters) > 0 : guessedletters.pop()
        while len(displayletters) > 0 : displayletters.pop()
        lives = 6
        finalscore=0
         score
        gamewords[:] = newgamewords
        hangmangame()
ゲーム開始時のコードは次のとおりです (これらの変数は定義されていません。念のため、コード内のすべての変数をグローバルにしました)。
lives=6
score=0