from tkinter import * def click(event): def close_window (): new.destroy() #root.destroy() new = Tk() new.title("New") new.geometry('200x200+100+100') new.configure(bg= '#ff5f00') button = Button (new, text = "Good-bye.", command =close_window) button.pack() new.mainloop() root = Tk() root.title("Python") root.geometry('400x250') root.configure(bg= '#ff5f00') b = Button(root, text="Кнопка") b.grid(column=0, row=2) b.bind("", click) root.mainloop()