title: printing a two dimensional array in python
body: <p>I have to print this python code in a 5x5 array the array should look like this : </p>
  
  <pre><code>0 1 4 (infinity) 3
  1 0 2 (infinity) 4
  4 2 0  1         5
  (inf)(inf) 1 0   3
  3 4 5   3        0
  </code></pre>
  
  <p>can anyone help me print this table? using indices.</p>
  
  <pre><code>for k in range(n):
          for i in range(n):
              for j in range(n):
                  if A[i][k]+A[k][j]&lt;A[i][j]:
                      A[i][j]=A[i][k]+A[k][j]
  </code></pre>