title: Filtering a list of strings by dynamic amounts of elements
body: <p>I need to write a function that filters a list of strings by multiple conditions:</p>
  
  <p>This would look this like this if I use one condition:</p>
  
  <pre><code>def get_newest(inputlist, filter_):
      small_list = [el for el in inputlist if filter_ in el]
      return small_list
  
  
  smaller = get_newest(lines, "condition1")
  smaller
  </code></pre>
  
  <p>However, the function has to be dynamic so the list comprehension would look like this for 2 arguments:</p>
  
  <pre><code>small_list = [el for el in inputlist if filter_ in el and filter_2 in el]
  </code></pre>
  
  <p>This is of course not dynamic.</p>
  
  <p>Passing a list as a single argument results in an error:</p>
  
  <pre><code>TypeError: 'in &lt;string&gt;' requires string as left operand, not list
  </code></pre>
  
  <p>How can I do this?</p>