title: python -> combinations of numbers and letters
body: <pre><code>#!/usr/bin/python
  import random
  lower_a = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
  upper_a = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
  num = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
  
  all = []
  all = &quot; &quot;.join(&quot;&quot;.join(lower_a) + &quot;&quot;.join(upper_a) + &quot;&quot;.join(num))
  all = all.split()
  x = 1
  c = 1
  while x &lt; 10:
      y = []
      for i in range(c):
              a = random.choice(all)
              y.append(a)
      print &quot;&quot;.join(y)
      x += 1
      c += 1
  </code></pre>
  <p>What I have now outputs something like the following:</p>
  <pre class="lang-none prettyprint-override"><code>5
  hE
  HAy
  1kgy
  Pt6JM
  2pFuCb
  Jv5osaX
  5q8PwWAO
  SvHWRKfI5
  </code></pre>
  <p>How can I make it systematically go through every combination of letters (upper and lowercase) for a given length, then add 1 to that length and repeat the process?</p>