[Tutor] Accesing "column" of a 2D list

Orest Kozyar orest.kozyar at gmail.com
Tue Aug 21 05:13:51 CEST 2007

I've got a "2D" list (essentially a list of lists where all sublists are of
the same length).  The sublists are polymorphic.  One "2D" list I commonly
work with is:

[ [datetime object, float, int, float],
  [datetime object, float, int, float],
  [datetime object, float, int, float] ]

I'd like to be able to quickly accumulate the datetime column into a list.
Is there a simple/straightforward syntax (such as list[:][0]) to do this, or
do we need to use a for loop?  I expect what I have in mind is similar to
the Python array type, except it would be polymorphic.  


More information about the Tutor mailing list