import tkinter as tk ablak = tk.Tk() gomb = tk.Button(ablak, text="Kilép", command=ablak.quit) gomb.pack() ablak.mainloop()