sorting a list of lists
stefan.behnel-n05pAM at web.de
Mon Aug 27 20:29:59 CEST 2007
>> i would like to sort a list of lists. The list is first sorted on the
>> second item in the sub-lists (which I can do), then on the third item
>> (which I can't).
> Write a comparator instead of dirty hacks
> def mycomparator(a, b):
Taking advantage of stable sorting is totally not a hack. The OP just tried
the two sorting steps in the wrong order.
More information about the Python-list