title: tKinter dialog button not responding
body: <p>I am new to tKinter. I tried this code and it did not work. When I click any of the buttons(Yes/No), the dialog does not close and the print statement does not 
  print. I know in Swing I need events to print this statement. Is it the same in tKinter?</p>
  
  <pre><code>from tkinter import *
  import tkinter.messagebox
  
  root = Tk()
  
  answer=tkinter.messagebox.askquestion('Question','what is your name?')
  if answer=='Yes':
  print('I am King')
  
  root.mainloop()
  </code></pre>
  
  <p>How do I go about correcting it?</p>