title: matching more than one substring in a list of strings
body: <p>I have a list of strings:</p>
  <pre><code>mylist = ['room.ax','room-ax1232upper.bin','room-ki9e0lower.bin','window-rm-down.ax','window-rm-up.ax']
  </code></pre>
  <p>I want to iterate through this list and check the string on 2 or more places to make sure I execute the correct function.</p>
  <p>for example (pseudocode):</p>
  <pre><code>for item in mylist:
      if item contains 'room' with extension '.ax':
          call_f1()
      elif item contains 'room' and also 'upper' and with extension '.bin':
          call_f2()
      elif item contains 'room' and also 'lower' and with extension '.bin':
          call_f3()
      elif item contains 'window' and also 'down' and with extension '.ax':
          call_f4()
  </code></pre>
  <p>If I was checking for a single substring then it's pretty straight forward:</p>
  <pre><code>for item in mylist:
      if 'room' in item:
          call_f()
  </code></pre>
  <p>But I can't figure out how to do this for multiple substrings.</p>