how to close a tkinter window inside a function code example Example: how to kill tkinter root=Tk() root.destroy()