Case-Insensitive Sorting of Multi-Dimensional Lists
Joe
joe at incomps.com
Fri Jun 8 16:33:26 EDT 2007
> > 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())
>
> Why ever not?
Sorry, I should have written back with my findings. I had run into the
problem described in this email:
http://mail.python.org/pipermail/python-list/2001-June/090863.html. See, I
was using bare execs elsewhere in the program.
It had nothing to do with the lambda, which ended up working perfectly once
I fixed the exec.
Thanks!
Jough
More information about the Python-list
mailing list