title: Combinatoric in Python Lists
body: <p>I have (say 2) Lists and I want to get all combinations between the elements in thoose lists BUT I want to put conditions in. So for example if the Element in the first List is <code>"yes"</code> , the Elements of the Second should be considered if they are "ifyes" in creating the combination and if the Element is "No" than not.</p>
  
  <p>I already know how to get all kind of combinations between a List of Lists ( I used the itertools lib ) :</p>
  
  <pre><code>import itertools
  
  list_d = [["yes","no"],["ifyes","ifyes2","ifno"]]
  
  #in this way we can use a for loop to iterate through the combinations
  iterator_d=itertools.product(*list_d)
  </code></pre>
  
  <p>So the Output I wish for but dont get should be something like :</p>
  
  <pre><code>["yes","ifyes"] ,["yes","ifyes2"],["no","ifno"]
  </code></pre>