title: How to select elements from a list using another list?
body: <p>I have two lists and would like to display all <code>list1</code> elements which have the common <code>list2</code> element - in this case it is <code>'a'</code>:</p>
  
  <pre><code>list1 = [1, 2, 3, 4, 5] 
  list2 = ['a', 'b', 'a', 'a', 'c']
  </code></pre>
  
  <p>Expected result: </p>
  
  <pre><code>[1, 3, 4]
  </code></pre>