title: Maintain a fixed size heap -python
body: <pre><code>h = []
  heapq.heappush(h,(10, 1200))
  heapq.heappush(h,(20, 31))
  heapq.heappush(h,(5, 1))
  </code></pre>
  
  <p>I want to maintain a fixed heap size of say 3,so when I next have <code>heapq.heappush(h,(3,15))</code>,key with value 20 gets deleted and I am left with values 3,5 and 10.Any ideas how?</p>