Re: sorting a list of lists

2007-08-28 Thread nicksavill
Thanks guys, dirty hack was what I needed to get a job done quickly. Nick -- http://mail.python.org/mailman/listinfo/python-list

sorting a list of lists

2007-08-27 Thread nicksavill
Hi, 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). eg. records = [['dog',1,2], ['chair',2,1], ['cat',1,3], ['horse',3,4], ['table',3,2], ['window',3,5]] I want sorted to [['dog',1,2],