tkinter destroy not working : <p>So I'm coding a game with python and tkinter where I need a popup window when the game finishes but when I click the "play again" button it doesn't destroy the popup window. Also the message on the popup appears with curly brackets, ie "{Game over, player} red wins!</p>

<p>Here's the popup window code:</p>

<pre><code>def gameOverPopup(winOrTie):
    if winOrTie==True:
    lText=("Game over, player",player,"wins!")
else:
    lText=("Game over, board full!")
popup=tk.Toplevel()
winLabel=tk.Label(popup,text=lText)
winLabel.grid(column=1,row=1,padx=50,pady=25)
againButton=tk.Button(popup,text="Play again",command=resetGame(popup))
againButton.grid(column=1,row=2,padx=50,pady=25)
endButton=tk.Button(popup,text="Quit",command=window.destroy)
endButton.grid(column=1,row=3,padx=50,pady=25)

def resetGame(popup):
    popup.destroy
</code></pre>
