title: Getting key with maximum value in dictionary?
body: <p>I have a dictionary where keys are strings, and values are integers.</p>
  <pre><code>stats = {'a': 1, 'b': 3000, 'c': 0}
  </code></pre>
  <p>How do I get the key with the maximum value? In this case, it is <code>'b'</code>.</p>
  <hr />
  <p>Is there a nicer approach than using an intermediate list with reversed key-value tuples?</p>
  <pre><code>inverse = [(value, key) for key, value in stats.items()]
  print(max(inverse)[1])
  </code></pre>