guys. I'm writing some code for a school project, and I'm getting a basic application planned out. I'm trying to keep a picture in the def but the image remains after you switch. How can I get it to go away when you change functions? My code:
def acceleration():
var.set("Acceleration \n \n \n \n \n \n Acceleration is defined as: \n 'the increase in the rate or speed of something. \n How could this be used in code?' \n \n \n")
photo = PhotoImage(file="accel.gif")
img = Label(root, image=photo)
img.photo = photo
img.pack();
Thanks Guys! ~Brayden
P.S. I'll gladly give you the entire script if necessary, though I think it won't.