[Tutor] Grouping based on attributes of elements in a List

Sander Sweers sander.sweers at gmail.com
Wed Mar 30 00:14:34 CEST 2011


2011/3/29 Rafael Durán Castañeda <rafadurancastaneda at gmail.com>:
> And more pythonic, I think

I don't agree :-). I think itemgetter from the operator module is more
flexible, readable and elegant than using a lamda. How would you sort
on the first and last item with lambda?

Greets
Sander


More information about the Tutor mailing list