python zip() function for a matrix

Viewed 16962

Possible Duplicate:
Matrix Transpose in Python

I have a matrix, say

A = [[0,0],[1,1]]

and I would like to zip its components to have

(0,1),(0,1)

With two rows in A, this can be obtained easily with

zip(A[0],A[1])

What if I have a matrix A of any dimension

A = [[0,0],[1,1],[2,2]]

How to zip a sequence of elements?

Thanks for your ideas.

1 Answers
Related