title: Filter list of dictionaries in python
body: <p>So, I need to build a filter that basically takes the following information...</p>
  
  <pre><code>dictlist = [{'ext': 'mp4',
                   'height': 480,
                   'id', 'pies'},
                  {'ext': 'webm',
                   'height': 360,
                   'id', 'pies2'},
                  {'ext': 'mp4',
                   'height': 360,
                   'id', 'charles1'},
                  {'ext': 'mp4',
                   'height': 720,
                   'id', 'tucker'}]
  </code></pre>
  
  <p>(there's more stuff there, but this is simplified)</p>
  
  <p>And then outputs the id of the element that is both an mp4 (or whatever I want. I'm aiming for a function or, alternative, to use built-in stuff to be more python-y if it exists) and has the highest height below a value.</p>
  
  <p>For example, I'd like to build a function that is similar to...</p>
  
  <pre><code>def getmestuff(listofdics, extrequired, heightmax):
      /*do the work*/
      return id;
  </code></pre>
  
  <p>So for example using the above data...</p>
  
  <pre><code>getmestuff(dictlist, 'mp4', 720)
  </code></pre>
  
  <p>Would return... pies</p>