title: Nested loops with matrix - why does this second matrix at all?
body: <p>This doesn't make sense to me yet. So the first while loop runs and prints matrix[0][0], matrix[0][1], matrix[0][2] and matrix[0][3] until j=4 and isn't less than <code>len(matrix[i])</code>. Okay, but now it pops out and goes back up to <code>while i&lt;len(matrix):</code>. Wouldn't this make it read <code>j=0</code> again and go straight back into the nested while loop? </p>
  
  <pre><code>matrix = [[4,5,6,7],[2,4,9,3]]
  i=0
  while i&lt;len(matrix):
      j=0
      while j&lt;len(matrix[i]):
          print matrix[i][j]
          j=j+1
      i=i+1
  </code></pre>