title: Python GUI open a "new page"
body: <p>When I press a button, I want to open a new side. Not a new window, the window should be the same, just the interface should change. </p>
  
  <p>How can I solve this without opening a new window?</p>
  
  <pre><code>from tkinter import *
  
  page1=Tk()
  label1=Label(page1, text="This is page 1")
  label1.pack()
  
  def topage2():
      page2=Tk()
      label2=Label(page2, text="This is page 2")
      label2.pack()
  
  button=Button(page1, text="To page 2", command=topage2)
  button.pack()
  
  mainloop()
  </code></pre>