How to erase labels from python? | Sololearn: Learn to code for FREE!


How to erase labels from python?

Hey SoloLearn community. I was attempting to make a game in python 3 with tkinter but could not figure out how to delete labels. Please help if you know the answer.

11/12/2017 5:17:04 PM

AnonymousPug 55

2 Answers

New Answer


from Tkinter import * def changebutton(): but.destroy() secondbut=Button(root,text="changed") secondbut.pack() if __name__=='__main__': root=Tk() global but but= Button(root,text="button",command=changebutton) but.pack() root.mainloop()


from which widget you want to erase label?