title: Nested For Loops To Fill An Array
body: <p>I'm learning Python's nested loops but couldn't use nested loops to fill a list with the combinations. So far I have</p>
  
  <pre><code>for i in range(3):
     for j in range(3):
         paths = [i,j]
         print paths
  </code></pre>
  
  <p>When this prints I get:</p>
  
  <pre><code>[0, 0]
  [0, 1]
  [0, 2]
  [1, 0]
  [1, 1]
  [1, 2]
  [2, 0]
  [2, 1]
  [2, 2]
  </code></pre>
  
  <p>Which is a list of the possible combinations but if I try an extra for-loop to index them it doesn't seem to work and only gives the first element. I'm trying to get an array in the form:</p>
  
  <pre><code>Array = [[0,0], [0,1]... [2,2]]
  </code></pre>
  
  <p>where I can index said array and get <code>Array[0] == [0,0]</code> and so on.</p>
  
  <p>Any hints on how to do this? I've tried for-loops and using the append function neither giving me the results I wanted.</p>