How to add more than two numbers using python in tkinter | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to add more than two numbers using python in tkinter

I tried this t=Tk () e=Entry (t) e.pack () def add (*e): m=sum (e) print (m) Button (t,text='add',command=add) t.mainloop () It prints 0 and I guess I know why so how to enable the entry field to take more than one number I don't won't two fields

13th Jan 2020, 1:58 PM
Pattern
Pattern - avatar
1 Answer
+ 1
do your self a favor and use pysimplegui its built on top of tkinter i believe and uses a vast less code looks fantastic very well documented and the most pytonic gui library for python https://pysimplegui.readthedocs.io/en/latest/#this-readme-and-cookbook
13th Jan 2020, 2:31 PM
userx
userx - avatar