Tkinter Combobox Values | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson

Tkinter Combobox Values

My code: Hey there, this is my first question posted here. I was wondering if there's any way for me to just specify a range of numbers to use for the tuples instead of typing them all out?

18th Jan 2018, 3:44 AM
Pyrexx Official
Pyrexx Official - avatar
1 Answer
+ 1
Use the range function. range(1,13) will return every number from 1-12. This method is upper bound exclusive so 13 is not included. To return a tuple just use tuple(range(1,13)) That was a short answer but you can use this for more information on the range function:
18th Jan 2018, 5:25 AM
Travis - avatar