title: Combine list correspond to the row index of 2D list
body: <p>I have two 2D lists which are A and B. List A has 3 rows with 2 columns while list B has 3 rows with 5 columns.</p>
  <pre><code>A=[[1,2],[3,4],[5,6]]
  B=[[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15]]
  C=[]
  </code></pre>
  <p>And I would like to combine list A and list B to a new list called C corresponding to the row index. Such that the values in C[0] will be values in A[0] and values in B[0] so that C[0]=[1,2,1,2,3,4,5]</p>
  <p>The expected combined list C:</p>
  <pre><code>C=[[1,2,1,2,3,4,5],[3,4,6,7,8,9,10],[5,6,11,12,13,14,15]]
  </code></pre>
  <p>And this is my work:</p>
  <pre><code>import numpy as np
  A=[[1,2],[3,4],[5,6]]
  B=[[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15]]
  C=[0,0,0]
  for i in range(0,3):
      C[i]=A[i],B[i]
  </code></pre>
  <p>But when I print out the list C, I find that it is different from I expected which looks like this:</p>
  <pre><code>[([1, 2], [1, 2, 3, 4, 5]), ([3, 4], [6, 7, 8, 9, 10]), ([5, 6], [11, 12, 13, 14, 15])]
  </code></pre>
  <p>Since I am a beginner of Python, I am not familiar with such 2D list operation, how can I achieve the expected result list C? Thank you for watching this post and answering my question.</p>