title: Match list elements with values of dictionary
body: <p>I have dictionaries inside list as:-</p>
  
  <pre><code>L= [{'id': 3, 'term': 'bugatti', 'bucket_id': 'ad_3'},
       {'id': 4, 'term': 'mercedez', 'bucket_id': 'ad_4'},
       {'id': 8, 'term': 'entertainment', 'bucket_id': 'ad_8'},
       {'id': 8, 'term': 'entertainment', 'bucket_id': 'ad_8'},
       {'id': 9, 'term': 'music', 'bucket_id': 'ad_9'}]
  </code></pre>
  
  <p>and another list as:-</p>
  
  <pre><code>words=['bugatti', 'entertainment', 'music','politics'] 
  </code></pre>
  
  <p>All I want to map elements of list <code>words</code> with key <code>term</code> and wants to get corresponding dictionary. Output expected as:</p>
  
  <pre><code>new_list= [{'id': 3, 'term': 'bugatti', 'bucket_id': 'ad_3'},
             {'id': 8, 'term': 'entertainment', 'bucket_id': 'ad_8'},
             {'id': 8, 'term': 'entertainment', 'bucket_id': 'ad_8'},
             {'id': 9, 'term': 'music', 'bucket_id': 'ad_9'}]
  </code></pre>
  
  <p>What I have tried as:</p>
  
  <pre><code>for d in L:
      for k,v in d.items():
          for w in words:
              if v==w:
                  print (k,v)
  </code></pre>
  
  <p>gives me only:</p>
  
  <pre><code>term bugatti
  term entertainment
  term entertainemnt
  term music
  </code></pre>