title: Python Tkinter: Close a window opened by a function not running anymore
body: <p>Providing I create a Tkinter window using <code>root = Tk()</code> into a function and exit the function, how can I then close the window? I'll post an example.</p>
  
  <pre><code>def example():
      root = Tk()
      root.update()
  
  print 'opening window'
  example()
  print 'closing window'
  #close window opened by example()?
  </code></pre>
  
  <p>I'd really like it if there was a way to close all opened Tkinter windows.</p>