import tkinter as tk
body = tk.Tk()
def remove_widgets():
for widget in body.winfo_children():
widget.destroy()
def page1():
remove_widgets()
tk.Button(body,text="Sayfa 1",command=page2).place(relx=.5,rely=.5,anchor="center",relheight=.3,relwidth=.5)
def page2():
remove_widgets()
tk.Button(body,text="Sayfa 2",command=page1).place(relx=.5,rely=.5,anchor="center",relheight=.3,relwidth=.5)
page1()
body.mainloop()