Andreas Kostyrka wrote:
> With 2.5 you can even do stuff like that:
> 
>>>> x=[range(5), range(3), range(7)]
>>>> max(x, key=lambda i: len(i))
> [0, 1, 2, 3, 4, 5, 6]

No need for the lambda, just use
max(x, key=len)

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to