permutations of lists python
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/104420/how-to-generate-all-permutations-of-a-list-in-python">How to generate all permutations of a list in Python</a>  </p>
</blockquote>



<p>I want to find all the permutations of a the elements in a list. 
but then with some conditions imposed.. umm..
Probably an example will help me explain better.</p>

<p>I have four lists</p>

<pre><code>["1"],["0"],["a","b","c],["d","e","f"]
</code></pre>

<p>Now I want to have the permutations in following way:</p>

<pre><code> "10ad" ,"10bd","10cd","10ae", "10be"
 ,"10bf"..
</code></pre>

<p>and so on..</p>

<p>So basically every element (with every element)??
Now I know the very naive way to do this.
But what is the pythonic way to do this?
if there is any??
Any suggestions</p>

<p>Thanks</p>
