title: Concatenate Big List Elements Efficiently
body: <p>I want to make a list of elements where each element starts with 4 numbers and ends with 4 letters with every possible combination. This is my code</p>
  
  <pre><code>import itertools
  
  def char_range(c1, c2):
      """Generates the characters from `c1` to `c2`"""
      for c in range(ord(c1), ord(c2)+1):
          yield chr(c)
  
  
  chars =list()
  nums =list()
  for combination in itertools.product(char_range('a','b'),repeat=4):
          chars.append(''.join(map(str, combination)))
  
  for combination in itertools.product(range(10),repeat=4):
          nums.append(''.join(map(str, combination)))
  
  c = [str(x)+y for x,y in itertools.product(nums,chars)]
  for dd in c:
          print(dd)
  </code></pre>
  
  <p>This runs fine but when I use a bigger range of characters, such as (a-z)  the program hogs the CPU and memory, and the PC becomes unresponsive. So how can I do this in a more efficient way?</p>