Adding Variables in Tkinter : <p>I have been working on a tkinter calculator which adds 2 numbers together. I am planning on making this more advanced by adding in set numbers that when you type a number in it multiplies the number by that set varible. However, even after extensive research I cannot find some help for my particular issue. Here is my code:</p>

<pre><code>from Tkinter import *
root = Tk()

e1 = Entry(root)
e2 = Entry(root)
l = Label(root)
def callback():
    total = sum(int(e.get()) for e in (e1, e2))
    l.config(text="answer = %s" % total)
b = Button(root, text="add them", command=callback)
for widget in (e1, e2, l, b):
    widget.pack()
b.mainloop()
</code></pre>

<p>Thanks.</p>
