Sorting (deeply) nested lists
mamboknave at gmail.com
mamboknave at gmail.com
Sat Mar 2 12:49:00 EST 2013
On Saturday, March 2, 2013 9:36:43 AM UTC-8, Peter Otten wrote:
>
> You can also write this as
>
> namedTuples.sort(key=lambda item: item[1][1])
>
That's exactly what I did before and got "IndexError: list index out of range".
So, I thought my lambda was wrong and posted here.
Now, having seen you reply, I dug deeper and... of course I had IndexError: the list was horribly empty!
Thanks so much for replying so quickly, Peter!
More information about the Python-list
mailing list