title: What's the standard way of doing this sort in Python?
body: <p>Imagine I have a list of tuples in this format:</p>
  
  <pre><code>(1, 2, 3)
  (1, 0, 2)
  (3, 9 , 11)
  (0, 2, 8)
  (2, 3, 4)
  (2, 4, 5)
  (2, 7, 8)
  ....
  </code></pre>
  
  <p>How could I sort the list by the first element of the tuples, and then by the second? I'd like to get to this list:</p>
  
  <pre><code>(0, 2, 8)
  (1, 0, 2)
  (1, 2, 3)
  (2, 3, 4)
  (2, 4, 5)
  (2, 7, 8)
  (3, 9 , 11)
  </code></pre>
  
  <p>I was thinking to do a sort for the first element, and then go through the list, and build a hash with subarrays. I will probably overcomplicate things :), and this is why I asked for other ways of doing this sort.</p>