title: Lengthy boolean search of strings in python
body: <p>I'm trying to search a set of strings for a specific set of words, and perform some actions if the various boolean conditions are met. I currently have an approach that works, but I'm hoping there is a more elegant way than what I have.</p>
  
  <pre><code>strings = ['30 brown bears', '30 brown foxes', '20 green turtles', 
              '10 brown dogs']
  
  for text in strings:
      if ('brown' in text) and ('bear' not in text) and ('dog' not in text):
          print text
  </code></pre>
  
  <p>This works as desired and prints <code>30 brown foxes</code>. What concerns me, however, is adding in more terms to the search. For example, what if 'cat', 'mouse', 'rabbit', etc. are all added to the <code>if-statement</code>? This seems to be a clunky and non-Pythonic way to approach things, so I'm hoping someone has a different way for this to be done. </p>