My current plan is to determine which is the first entry in a number of Tkinter listboxes highlighted using .curselection() and combining all of the resulting tuples into a list, producing this:
tupleList = [(), (), ('24', '25', '26', '27'), (), (), (), ()]
I'm wondering as to how to determine the lowest integer. Using .min(tupleList) returns only (), being the lowest entry in the list, but I'm looking for a method that would return 24.
What's the right way to get the lowest integer in any tuple in the list?
>>> nums = [(), (), ('24', '25', '26', '27'), (), (), (), ()]
>>> min(int(j) for i in nums for j in i)
24
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With