title: How to maintain dictionary in a heap in python?
body: <p>I have a dictionary as follows:</p>
  
  <pre><code>{'abc':100,'xyz':200,'def':250 .............}
  </code></pre>
  
  <p>It is a dictionary with keys as a name of a entity and the value is count of that entity. I need to return the top 10 elements of from the dictionary.</p>
  
  <p>I can write a heap to do it, but I'm not sure how to do value to key mapping as certain values will be equal.</p>
  
  <p>Is there any other data structure to do this?</p>