title: How to compare two lists to keep matching substrings?
body: <p>As best I can describe it, I have two lists of strings and I want to return all results from list A that contain any of the strings in list B. Here are details:</p>
  
  <pre><code>A = ['dataFile1999', 'dataFile2000', 'dataFile2001', 'dataFile2002']
  B = ['2000', '2001']
  </code></pre>
  
  <p>How do I return </p>
  
  <pre><code>C = ['dataFile2000', 'dataFile2001']?
  </code></pre>
  
  <p>I've been looking into list comprehensions, doing something like below </p>
  
  <pre><code>C=[x for x in A if B in A] 
  </code></pre>
  
  <p>but I can't seem to make it work. Am I on the right track?</p>