Hi, I need to perform some horrible functions in python I need to do, using sort in a similar way that Excel can.
With a dictionary like: Code: ( text ) 1. >>> d 2. {8: (99, 99), 9: [(55, 67), (77, 66), (67, 88)], 4: [(45, 78), (56, 78), (99, 78)], 5: (67, 77)} I want to sort the entire dictionary based on the last values in each line. First for [-1][0] and then[-1][0]. So sorted descending I would like the output to look like: Code: ( text ) 1. >>> d 2. {8: (99, 99), 4: [(45, 78), (56, 78), (99, 78)], 9: [(55, 67), (77, 66), (67, 88)], 5: (67, 77)} Many thanks
-- http://mail.python.org/mailman/listinfo/python-list