Case-Insensitive Sorting of Multi-Dimensional Lists

Joe joe at
Fri Jun 8 18:04:21 CEST 2007

> Try:
> list.sort(key=lambda el: el[0].lower())

Now, I would like to be able to specify which index to sort by.  I am not
able to pass in external variables like:

List.sort(key=lambda el: el[indexNumber].lower())

I am new to lambda and have searched for a few hours this morning, coming up
empty handed.  Is this possible?



More information about the Python-list mailing list