title: Generate wordlist by List of List of character
body: <p>I want to generate a wordlist by list of list of character, like:</p>
  
  <pre class="lang-py prettyprint-override"><code>A=[['a','b','c'],['d'],['e','f']]
  </code></pre>
  
  <p>where <code>a[0]</code> stores all possible character at first place, <code>a[1]</code> stores all possible character at second place and so on. All possible words generated by list 'A' will be:</p>
  
  <pre class="lang-none prettyprint-override"><code>ade
  adf
  bde
  bdf
  cde
  cdf
  </code></pre>
  
  <p>I am generating this list by:</p>
  
  <pre class="lang-py prettyprint-override"><code>for i in a[0]:
      for j in a[1]:
          for k in a[2]:
              print i+j+k
  </code></pre>
  
  <p>This code works fine for fixed length of <code>list(i.e. len(A))</code>. I want to write a generalize code which can generate wordlist by list of any size.</p>