title: How to sort the results of Counter.mostCommon(n) lexicographically (by counter, then by value)?
body: <p>How can I sort the results of <code>Counter.mostCommon</code> by the counter, and then the value?</p>
  
  <p>My original code:</p>
  
  <pre><code>from collections import Counter
  for counter in Counter("abcdefg").most_common(3): 
      print(counter[0], counter[1])
  </code></pre>
  
  <p>The output is different every time, since each value has a count of 1.
  Sometimes it is</p>
  
  <pre><code>a 1
  b 1
  e 1
  </code></pre>
  
  <p>sometimes</p>
  
  <pre><code>b 1
  d 1
  f 1
  </code></pre>
  
  <p>etc.</p>
  
  <p><strong>I want this:</strong></p>
  
  <pre><code>a 1
  b 1
  c 1
  </code></pre>
  
  <p>I've also tried sorting the resulting tuples::</p>
  
  <pre><code>from collections import Counter
  for counter in sorted(Counter("abcdefg").most_common(3), key=lambda x: x[0]): print(counter[0], counter[1])
  </code></pre>
  
  <p>and sorting the string</p>
  
  <pre><code>from collections import Counter
  for counter in Counter(sorted("abcdefg")).most_common(3): print(counter[0], counter[1])
  </code></pre>
  
  <p>but I get the same unpredictable results</p>