Getting at an item in a list of tupples

Bob Greschke bob at passcal.nmt.edu
Tue Dec 11 19:00:37 EST 2001


Here's what I've got

   a = []
   a.append((ints, floats, strings))
   a.append((ints, floats, strings))
   a.append((ints, floats, strings))
   a.append((ints, floats, strings))
   ...

I want to do something like

   print max(of all of the floats)
   print min(of all of the floats)

In general, how do you get at the floats (or ints, or strings)?  We
can see doing something with map() calling a function that returns the
second item, but isn't there something a little simpler?

Thanks!

Possibly Stupid






More information about the Python-list mailing list