End tkinter program - python

0 votes
How do I close the tkinter program? Can you give an example? Thank you!
Aug 9, 2019 in Python by Faiza
535 views

1 answer to this question.

0 votes

You can use the destroy() to close a tkinter window.

from Tkinter import *

toss = Tk()
Button(toss, text="Exit", command=root.destroy).pack()
toss.mainloop()
answered Aug 9, 2019 by Barbara

Related Questions In Python

0 votes
1 answer

Exiting a python program

Use the quit() function. This function can ...READ MORE

answered May 8, 2018 in Python by Nietzsche's daemon
• 4,260 points
296 views
+1 vote
3 answers

How to run the Python program forever?

you can also do the old fashioned ...READ MORE

answered Jun 10, 2019 in Python by brianno
19,993 views
0 votes
1 answer

Need help with Tkinter window formatting using Python

Tkininter comes with the columnspan argument to span the labels ...READ MORE

answered Sep 7, 2018 in Python by aryya
• 7,450 points
626 views
0 votes
1 answer

Python: Issue with 'unexpected end of pattern'

I should start by stating that using ...READ MORE

answered Sep 12, 2018 in Python by Priyaj
• 58,090 points
2,308 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,023 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
3,424 views
0 votes
2 answers

How can I write a program to add two numbers using functions in python?

there is sum() function as a built ...READ MORE

answered Oct 25, 2020 in Python by anonymous
23,237 views
0 votes
4 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP