title: all combination in list of lists without duplicates in python
body: <p>let say I have a list of lists </p>
  
  <pre><code>[[a1, a2, a3], [b1, b2], [c1, c2, c3, c4]]
  </code></pre>
  
  <p>The number of lists in the list is not known in advance.</p>
  
  <p>I want to have all combinations of elements from the different list, so </p>
  
  <pre><code>[a1, b1, c1], [a1, b1, c2], ..., [a3, b2, c4] 
  </code></pre>
  
  <p>but if there common elements in the different list, all these combinations need to be deleted. So if for example, <code>a1 = c2</code>, then the combinations <code>[a1, b1, c2], [a1, b2, c2]</code> need to be deleted in the resulting list. </p>
  
  <p>To get all possible combinations, you can use the answer on <a href="https://stackoverflow.com/questions/2853212/all-possible-permutations-of-a-set-of-lists-in-python]">All possible permutations of a set of lists in Python</a>, but can you automaticaly delete all combinations with common elements?</p>