title: Logic operations (Python 3.4) - is there a way to simplify long conditional statements?
body: <p>I have the following list of integers, which I need to cross compare with eachother:</p>
  
  <pre><code>compare = [[2,4,5,7,8,10,12],[1,3,5,8,9,10,12],[1,2,4,6,8,10,11,12],[2,3,4,6,7,9,12]]
  </code></pre>
  
  <p>Even though you cant name lists within lists in Python(I think), we'll just call each sublist a,b,c and d.</p>
  
  <p>What I wish to do, is make a for loop that can compare whether any one integer is present in either 2, 3, or all of the lists.  The loop it self is simple, it iterates over all the integers in a-d, but the conditions to which the comparisons are made is quite complex, or perhaps just long winded, for  e.g:</p>
  
  <pre><code>    if i in a and i in b, or i in a and i in c... or i in a and i in b and i in c... or i in (every list):
          pattern.append (i)
  </code></pre>
  
  <p>Obviously this is impractical. I've looked up solutions to the issue but to no avail. Also, would the &amp; and | operators be usable in anyway, or should I stick to AND and OR?</p>
  
  <p>Thanks in advance for any help! </p>