Steven Bethard wrote: > Ron Adam wrote: >> grades.sort(lambda x,y: cmp(students[x[1]][0], students[y[1]][0]))
> Assuming that students[x[1]][0] is what you want to sort on, this may
> also be written as:
>
> grades.sort(key=lambda x: students[x[1]][0])
Yes, I figured there was a better way to write it.
Thanks, Steve
--
http://mail.python.org/mailman/listinfo/python-list
