title: python tkinter return value from function used in command
body: <p>how do i get the return value A to C? I am not using class by the way.</p>
  
  <pre><code>def button:
      mylabel = Label(myGui, text = "hi").grid(row = 0, column = 0)
      A = B.get()
      return A
  
  B = StringVar()
  C = ""
  myentry = Entry(myGui, textvariable = B).grid(row = 1, column = 0)
  Submit = Button(myGui, text = "Submit", command = button).grid(row = 1, column = 1)
  </code></pre>