title: python find min value in the list of dictionary plus if condition
body: <p>I have the following list of dictionaries,</p>
  
  <pre><code>aa=[{'score': 1.463179736705023, 'type': 'exam'}, 
      {'score': 6.676176060654615, 'type': 'homework'}, 
      {'score': 11.78273309957772, 'type': 'quiz'}, 
      {'score': 35.8740349954354, 'type': 'homework'}]
  
  &gt;&gt;&gt; obj=min(aa,key=lambda y:y['score'])
  &gt;&gt;&gt; print obj
  {'score': 1.463179736705023, 'type': 'exam'}
  </code></pre>
  
  <p>tried this:</p>
  
  <pre><code>&gt;&gt;&gt; obj1=min(aa,key=lambda y:y['score',{'type':"homework"}])
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "&lt;stdin&gt;", line 1, in &lt;lambda&gt;
      TypeError: unhashable type: 'dict'
  </code></pre>
  
  <p>Now how to find the object with min scores only if type="homework" ?</p>