Learn Before
Concept
Closing the window using button click
We can use the destroy() method to quit a window.
button = tk.Button(text="Quit", foreground="red", command=window.destroy) button.pack()
We can pass command=window.destroy as a parameter to close a window with a button click

0
1
Updated 2021-05-12
Tags
Python Programming Language
Data Science