0

Tkinter Combobox Values

My code: https://code.sololearn.com/cc65YUVItTDU/#py 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: https://www.pythoncentral.io/pythons-range-function-explained/
18th Jan 2018, 5:25 AM
Travis
Travis - avatar