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