> > 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 -- http://mail.python.org/mailman/listinfo/python-list