how to use function and then quit window with one bottun tkinter python code example Example: python tkinter how to close a window root.destroy()