how to exequte root.quit without a button tkinter code example Example: python tkinter close gui window from tkinter import * root=tk.Tk() root.destroy()