Roose wrote:

> Not to belabor the point, but in the example on that page, max(L, key=len)
> could be written max(len(x) for x in L).
 
No, it can't:

Python 2.5a0 (#2, Mar  5 2005, 17:44:37)
[GCC 3.3.3 (SuSE Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> max(["a", "bbb", "cc"], key=len)
'bbb'

Peter

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to