Getting at an item in a list of tupples
fperez528 at yahoo.com
Mon Dec 10 19:13:45 CET 2001
Emile van Sebille wrote:
> [(1, 2.0, '3'), (11, 12.0, '13'), (21, 22.0, '23')]
>>>> max([i for i in a])
Nice. I just sent in a solution using map(), but this does look more readable
(and may be quicker, since it doesn't require calling a selection lambda()).
Note to self: must get used to using list comprehensions more.
More information about the Python-list