I've got a list of datetimes from which I want to construct time segments. In other words, turn [t0, t1, ... tn] into [(t0,t1),(t1,t2),...,(tn-1, tn)]. I've done it this ...
I have a list of tuples, say (name, number, birthday, gender). If I wanted to reverse sort this list by their birthday, how could I sort this in python?