title: Is it possible to filter list of substrings by another list of strings in Python?
body: <p>To filter list of strings by another list of strings in Python we can use the following code:</p>
  
  <pre><code>result = [x for x in strings1 if x in strings2]
  </code></pre>
  
  <p>But how can we filter list of substrings by another list of strings? For example:</p>
  
  <pre><code>substrings = ['a', 'b', 'c']
  strings = ['_b_', '_c_', '_d_']
  </code></pre>
  
  <p>Result should be:</p>
  
  <pre><code>result = ['b', 'c']
  </code></pre>