title: Sorting a list of lists in Python
body: <pre><code>c2=[]
  row1=[1,22,53]
  row2=[14,25,46]
  row3=[7,8,9]
  
  c2.append(row2)
  c2.append(row1)
  c2.append(row3)
  </code></pre>
  
  <p><code>c2</code> is now:</p>
  
  <pre><code>[[14, 25, 46], [1, 22, 53], [7, 8, 9]]
  </code></pre>
  
  <p>how do i sort <code>c2</code> in such a way that for example:</p>
  
  <pre><code>for row in c2:
  
  sort on row[2]
  </code></pre>
  
  <p>the result would be:</p>
  
  <pre><code>[[7,8,9],[14,25,46],[1,22,53]]
  </code></pre>
  
  <p>the other question is how do i first sort by row[2] and within that set by row[1]</p>