I have buttons that won't go away. I wrote an absolute location of the buttons and it won't go away when I try to forget it. I managed to make it disappear with writing the absolute location of the button to the coordinate outside the window. How to make it go away with the delete function?
This is what I have
from tkinter import*
def delete():
button1.pack_forget()
button2.pack_forget()
gui =Tk()
gui.geometry("250x500")
button1 = Button(gui, text="1", command=delete, pady= 15, padx= 20)
button1.pack(pady= 5, padx= 20)
button1.place(x=85, y=60)
button2 = Button(gui, text="2", pady= 15, padx= 20)
button2.pack(pady= 5, padx= 20)
button2.place(x=63, y=120)
gui.mainloop()