title: How to sort a dictionary by value (DESC) then by key (ASC)?
body: <p>Just after discovering the amazing <code>sorted()</code>, I became stuck again.</p>
  
  <p>The problem is I have a dictionary of the form <code>string(key) : integer(value)</code> and I need to sort it in descending order of its integer values, <strong>but</strong> if two elements where to have same value, then by ascending order of key.</p>
  
  <p>An example to make it clearer:</p>
  
  <pre><code>d = {'banana':3, 'orange':5, 'apple':5}
  out: [('apple', 5), ('orange', 5), ('banana', 3)]
  </code></pre>
  
  <p>After doing some research I arrived at something like:</p>
  
  <pre><code>sorted(d.items(), key=operator.itemgetter(1,0), reverse=True)
  out: [('orange', 5), ('apple', 5), ('banana', 3)]
  </code></pre>
  
  <p>This is because it's reverse-sorting both the value and the key. I need the key to be un-reversed.</p>