How can I get the first value of a tuple in a tuples list where second value is the minor?
mylist = [(a, date_a), (b, date_b), ..., (z, date_z)]
If date_d is the minor of all dates how can I get d ?
>Solution :
The min builtin actually accepts an optional key callable as a paramter, just like sorted were that is more known.
which means you can customize what does it mean to be "minimal" for your sequence:
min_item = min(mylist, key item: item[1])[0]