title: How to get an integer from a tkinter entry box?
body: <p>I am trying to work out how to get a value from a tkinter entry box, and then store it as a integer. This is what I have:</p>
  <pre class="lang-py prettyprint-override"><code>AnswerVar = IntVar()
  AnswerBox = Entry(topFrame)
  AdditionQuestionLeftSide = random.randint(0, 10)
  AdditionQuestionRightSide = random.randint(0, 10)
  AdditionQuestionRightSide = Label(topFrame, text= AdditionQuestionRightSide).grid(row=0,column=0)
  AdditionSign = Label(topFrame, text=&quot;+&quot;).grid(row=0,column=1)
  AdditionQuestionLeftSide= Label(topFrame, text= AdditionQuestionLeftSide).grid(row=0,column=2)
  EqualsSign = Label(topFrame, text=&quot;=&quot;).grid(row=0,column=3)
  AnswerBox.grid(row=0,column=4)
  answerVar = AnswerBox.get()
      
  root.mainloop() 
  (
  
  
  )
  </code></pre>
  <p>How can I take the input from AnswerBox, and store it in the integer variable &quot;answer&quot;?</p>