how to kill the process of the function in tkinter code example Example: how to kill tkinter root=Tk() root.destroy()