title: I am trying to delete a window using a button.
body: <p>I am trying to delete the previous window I created but once I use a command to call it, I receive an error. Can anyone care to explain how this works? </p>
  
  <pre><code>from tkinter import  *
  root= Tk()
  </code></pre>
  
  <p>I need help here.</p>
  
  <pre><code>def clickEvent():
  
      master = Tk()
      Label2=Label(master, text="Here are the scientific names of some Animals", font=("Times", 13) ).grid(row=0)
      Label(master, text="Wolf=Canis lupus", font=("Arial", 11)).grid(row=1)
      Label(master, text="Lion=Panthera leo",font=("Arial", 11)).grid(row=2)
      Label(master, text="Panda=Ailuropoda melanoleuca", font=("Arial", 11)).grid(row=3)
      Label(master, text="Jellyfish=Medusozoa", font=("Arial", 11)).grid(row=4)
      Label(master, text="Marmoset=Callithrix jacchus", font=("Arial", 11)).grid(row=5)
      Label(master, text="Tiger=Panthera tigris", font=("Arial", 11)).grid(row=6)
      Label(master, text="Zebra=Equus quagga", font=("Arial", 11)).grid(row=7)
      Label(master, text="Would you like to take the quiz now?", font=("Arial", 13)).grid(row=15)
      e1 = Entry(master,textvariable=entryText).grid(row=1, column=1)
      button2 = Button(root, text="Yes", command=create_window)
      button2.pack()
  
  
  mylabel=Label(root, text="Welcome to the Animal Trivia Game!", font=("Arial", 14))
  mylabel.pack()
  label2=Label(root, text="Click 'Start' to begin:)", font=("Arial", 14))
  label2.pack()
  topFrame=Frame(root)
  topFrame.pack()
  bottomFrame=Frame(root)
  bottomFrame.pack(side=BOTTOM)
  leftFrame=Frame(root)
  leftFrame.pack(side=LEFT)
  rightFrame=Frame(root)
  rightFrame.pack(side=RIGHT)
  
  
  
  
  button1=Button(topFrame,text="Start", font=("Arial", 16), fg="White",bg="Turquoise",height=1, width=10,command=clickEvent)
  button1.pack()
  
  mainloop()
  
  def clickEvent2():
      master=Tk()
  
      mainloop()
  
  
  
  
  
  
  
  def clickEvent2():
      master = Tk()
      topFrame=Frame(root)
      topFrame.pack()
      bottomFrame=Frame(root)
      bottomFrame.pack(side=BOTTOM)
      leftFrame=Frame(root)
      leftFrame.pack(side=LEFT)
      rightFrame=Frame(root)
      rightFrame.pack(side=RIGHT)
  
  button2=Button(topFrame,text="Start Now", font=("Arial", 16), fg="White",bg="Turquoise",height=1, width=10,command=clickEvent)
  button2.pack()
  
  mainloop()
  
  
  
  root.mainloop()
  </code></pre>
  
  <p>greatly appreciate it if anyone could help. </p>