title: Sorting by two values in python. One ascending and one descending
body: <p>Having dictionary:</p>
  <pre><code>{'david': ['APP', 2], 'ala': ['PROD', 2], 'steven': ['DEV', 4], 'katya': ['SYS', 2]}
  </code></pre>
  <p>I want to sort it by prioritizing second element of list (descending) and then by first element of list (ascending).
  My desired output is:</p>
  <pre><code>&gt;&gt;&gt; [('steven', ['DEV', 4]), ('david': ['APP', 2]), ('ala': ['PROD', 2]), ('katya': ['SYS', 2])]
  </code></pre>
  <p>The best idea i have:</p>
  <pre><code>x = sorted(x.items(), key=lambda elem: elem[1][1], reverse=True)
  x.sort(key=lambda elem: elem[1][0])
  &gt;&gt;&gt; [('david', ['APP', 2]), ('steven', ['DEV', 4]), ('ala', ['PROD', 2]), ('katya', ['SYS', 2])]
  </code></pre>
  <p>Is there any function or approach from core python that would take into consideration sorting on the same object with values prioritizing, in my case if digits (digits are being sorted descending) are equal then look at strings like 'APP', 'DEV'... and sort them ascending by string?</p>