title: second maximum value in dictionary python
body: <p>I have a regular dictionary like:</p>
  
  <pre><code>A = {37:4783, 92:47834, 12:234234,....}
  </code></pre>
  
  <p>I need to return the second maximum value, the third, and so on. I was trying with:</p>
  
  <pre><code>max(A, key=lambda x: x[1])
  </code></pre>
  
  <p>but I got this error: TypeError: 'float' object is unsubscriptable</p>
  
  <p>what am I doing wrong?</p>
  
  <p>thanks</p>