title: python zip() function for a matrix
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4937491/matrix-transpose-in-python">Matrix Transpose in Python</a>  </p>
  </blockquote>
  
  
  
  <p>I have a matrix, say</p>
  
  <pre><code>A = [[0,0],[1,1]]
  </code></pre>
  
  <p>and I would like to zip its components to have</p>
  
  <pre><code>(0,1),(0,1)
  </code></pre>
  
  <p>With two rows in A, this can be obtained easily with</p>
  
  <pre><code>zip(A[0],A[1])
  </code></pre>
  
  <p>What if I have a matrix A of any dimension</p>
  
  <pre><code>A = [[0,0],[1,1],[2,2]]
  </code></pre>
  
  <p>How to zip a sequence of elements?</p>
  
  <p>Thanks for your ideas.</p>