iapain wrote:
>> 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
> 
> mylistoflist.sort(mycomparator)
> 
> def mycomparator(a, b):
>   #do

Taking advantage of stable sorting is totally not a hack. The OP just tried
the two sorting steps in the wrong order.

Stefan
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to