title: Tkinter remove grid label from method
body: <p>I'm writing a simple program with Python and Tkinter.</p>
  <p>When clicking on the <code>ForwardButton</code> all the widgets shall be removed and then new ones displayed.</p>
  <p>This works with the wigets i created first, but the widgets within the <code>DisplayWelcome</code> function won't disappear.</p>
  <p>Once the first ones (<code>HelloInfo1</code>...<code>SaveName</code>) are removed.</p>
  <p>I get the error:</p>
  <pre><code>  ... in ForwardButtonClicked
      DisplayWelcome1.grid_remove()
  NameError: name 'DisplayWelcome1' is not defined&quot;
  </code></pre>
  <p>How can I remove the widgeds called in the method?</p>
  <pre><code>#DisplayWelcome
  def DisplayWelcome():
      DisplayWelcome1 = ttk.Label(root, font=(&quot;Calibri&quot;, 14), text=(str('Hallo, ' + name.get() + ' :)')))
      DisplayWelcome1.grid(column=0, row=5, sticky=tk.NW, padx=0, pady=0)
      DisplayWelcome2 = ttk.Label(root, font=(&quot;Calibri&quot;, 14), text=&quot;xxx&quot;)
      DisplayWelcome2.grid(column=0, row=6, sticky=tk.NW, padx=0, pady=0)
      DisplayWelcome3 = ttk.Label(root, font=(&quot;Calibri&quot;, 14), text=&quot;xxx&quot;)
      DisplayWelcome3.grid(column=0, row=7, sticky=tk.NW, padx=0, pady=0)
      ForwardButton = ttk.Button(root, text=&quot;Weiter&quot;, command=lambda: ForwardButtonClicked())
      ForwardButton.grid(column=0, row=8, sticky=tk.NW, padx=0, pady=0)
      getname.delete(0,'end')
  
  #ForwardButtonClicked
  def ForwardButtonClicked():
      HelloInfo1.grid_remove()
      HelloInfo2.grid_remove()
      img_label.grid_remove()
      NameInfo.grid_remove()
      getname.grid_remove()
      SaveName.grid_remove()
      DisplayWelcome1.grid_remove()
      DisplayWelcome2.grid_remove()
      DisplayWelcome3.grid_remove()
      ForwardButton.grid_remove()
  </code></pre>