calling a function before window close tkinter code example Example: how to manually close tkinter window root = tk() root.destroy()