when i run the program it has already deleted the widget btn. it returns frame1 with only the delete_button, which means it has already deleted btn prior to command.
when i removed the command Btn.destroy the program returns all the expected widgets.
import tkinter as tk
class run:
def __init__(self, master):
Btn = tk.Button(master, text="Btn1")
Btn.pack()
delete_button = tk.Button(master, text="start", command=Btn.destroy())
delete_button.pack()
master = tk.Tk()
i = run(master)
master.mainloop()