title: Testing if multiple objects are in a list using one "in" statement (Python)
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3931541/python-check-if-all-of-the-following-items-is-in-a-list">Python Check if all of the following items is in a list</a>  </p>
  </blockquote>
  
  
  
  <p>So I want to test whether both word and word1 are in the list lst.
  Of course, I could write:</p>
  
  <pre><code>if word in lst and word1 in lst:
      do x
  </code></pre>
  
  <p>But I wondered if I could shorten that statement to something like:</p>
  
  <pre><code>if (word and word1) in lst:
      do x
  </code></pre>
  
  <p>Of course, that does not work, but is there anything effectively similar that will?</p>
  
  <p>I tried the following, but as you can see, it does not yield the desired result.</p>
  
  <pre><code>&gt;&gt;&gt; word in lst
  True
  &gt;&gt;&gt; word1 in lst
  True
  &gt;&gt;&gt; (word, word1) in lst
  False
  </code></pre>
  
  <p><strong>EDIT:</strong> Thank you for the answers, I think I have a pretty good idea of how to do this now.</p>