Case-Insensitive Sorting of Multi-Dimensional Lists

Joe joe at incomps.com
Fri Jun 8 11:39:24 EDT 2007


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

Thanks!  Worked like a charm :)

> BUT - it's not a good idea to use list as a name, 'cos list is a
> built-in, and you're obscuring it.

Oh, don't worry.  That was strictly my portrayal of the problem.

Thanks again!

Jough




More information about the Python-list mailing list