title: Python - Filter list of dictionaries based on multiple keys
body: <p>Say I have the dictionary:</p>
  
  <pre><code>myDict = [{'first': 'James', 'middle': 'Smith', 'last': 'Joule'}, 
          {'first': 'James', 'middle': 'Johnson', 'last': 'Watt'},
          {'first': 'Christian', 'middle': 'Edward', 'last': 'Doppler'}
          {'first': 'Robert', 'last': 'Antonio'}]
  </code></pre>
  
  <p>And I have a list called keys:</p>
  
  <pre><code>keys = ["middle", "last"]
  </code></pre>
  
  <p>I want to filter myDict based on each value in keys, which would result in</p>
  
  <pre><code>filteredDict = [{'middle': 'Smith', 'last': 'Joule'},
                {'middle': 'Johnson', 'last': 'Watt'},
                {'middle': 'Edward', 'last': 'Doppler'},
                {'last': 'Antonio'}]
  </code></pre>
  
  <p>As seen in the list dictionary in myDict list, the dictionary DOESNT have to have both keys in order to be placed into filteredDict. Is there an easy way to do this with dictionary comprehension in Python?</p>