Getting at an item in a list of tupples
bob at passcal.nmt.edu
Wed Dec 12 10:51:09 EST 2001
"Fernando Pérez" <fperez528 at yahoo.com> wrote in message
news:9v695t$blv$1 at peabody.colorado.edu...
> Emile van Sebille wrote:
> >>>> a
> > [(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
> (and may be quicker, since it doesn't require calling a selection
> Note to self: must get used to using list comprehensions more.
Whew! Me too! :)
More information about the Python-list