title: Check if elements occur together in all lists?
body: <p>Say I have a list of lists like so:</p>
  
  <pre><code>l = [[1,2,3],[6,5,4,3,7,2],[4,3,2,9],[6,7],[5,1,0],[6,3,2,7]]
  </code></pre>
  
  <p>How would I write python code to check if there are elements that always occur together? For example, in the above example 2,3 and 6,7 always occur in the same lists. (there may be others, not sure).</p>
  
  <p>What's the easiest to understand way of achieving this? </p>
  
  <p>My only idea is to convert <code>inner-list1</code> to set and check intersection with <code>inner-list2</code> but when I check intersection with <code>inner-list3</code>, those elements may not occur at all in <code>inner-list3</code>.</p>
  
  <p>Could I do something like:</p>
  
  <pre><code>for i in range(0,len(lists)):    
      a=set(lists[i]).intersection(lists[i+1])
      if (len(a))==0:
          continue
      else:
          a.intersection(lists[i+1])
  </code></pre>
  
  <p>This of course doesn't work but how could I formally code this or is there a better approach to this?</p>