close previous window tkinter code example Example 1: python tkinter how to close a window root.destroy() Example 2: how to kill tkinter root=Tk() root.destroy()