title: itertools.product with restrictions
body: <p>Given the following lists of variables:</p>
  
  <pre class="lang-py prettyprint-override"><code>greek = ['alpha', 'beta', 'gamma']
  numbers = [1, 2, 3]
  latin = ['x', 'y']
  </code></pre>
  
  <p>My baseline choice is <code>['alpha', 1, 'x']</code>. I'd like to generate the following variations, changing one parameter at a time:</p>
  
  <pre><code>variations = [
          ['beta', 1, 'x'], ['gamma', 1, 'x'],  # Varying greek
          ['alpha', 2, 'x'], ['alpha', 3, 'x'], # Varying numbers
          ['alpha', 1, 'y'],                    # Varying latin
          ]
  </code></pre>
  
  <p>I can generate the full matrix of all combinations with <code>it.product()</code>, and I can get the desired result in a few lines of code as well.</p>
  
  <p>What is a nice, pythonic way to achieve that? Would be great to generalize that to many sets of parameters.</p>