title: Construction 3x3 Matrix using rows and columns-python
body: <p>I'm trying to write a program that uses two nested while loops to print the rows and columns of a 3x3 grid (numbered 1 to 3), excluding the cells along the diagonal (i.e., where the row and column have the same value).</p>
  
  <p>I wrote the code but it only prints:
  1,2 and 1,3</p>
  
  <p>Here is my code:</p>
  
  <pre class="lang-py prettyprint-override"><code>row=0
  col=0
  while row&lt;3:
      row= row+1
      while col&lt;3:
          col= col+1
          if col==row:
              pass
          else:
              print(row,col)
  </code></pre>
  
  <p>Instead, it's supposed to print 1,2 1,3 2,1 2,3 3,1 and 3,2</p>