On Wed, 8 Sep 2010 15:11:51 -0400 Benjamin Kaplan <benjamin.kap...@case.edu> wrote:
> There is no simple way to get [1,4,7] because it is just a list of > lists and not an actual matrix. You have to extract the elements > yourself. > > col = [] > for row in a: > col.append(row[0]) > > > You can do this in one line using a list comprehension: > [ row[0] for row in a ] I would suggest this (esp. the list comprehension version) over my suggestion of zip(). WAAAYYYY more readable. Apparently I'm getting rusty. /W -- INVALID? DE! -- http://mail.python.org/mailman/listinfo/python-list