title: Populate list with tuples
body: <p>I'm just fiddling with a simulation of (<a href="http://rosalind.info/problems/iprb/" rel="nofollow">Mendel's First Law of Inheritance</a>).</p>
  
  <p>Before i can let the critters mate and analyze the outcome, the population has to be generated, i.e., a list has to be filled with varying numbers of three different types of tuples without unpacking them.</p>
  
  <p>While trying to get familiar with <a href="http://docs.python.org/2/library/itertools.html" rel="nofollow">itertools</a> (I'll need combinations later in the mating part), I came up with the following solution: </p>
  
  <pre><code>import itertools
  
  k = 2
  m = 3
  n = 4
  
  hd = ('A', 'A')       # homozygous dominant
  het = ('A', 'a')      # heterozygous 
  hr = ('a', 'a')       # homozygous recessive
  
  fhd = itertools.repeat(hd, k)
  fhet = itertools.repeat(het, m)
  fhr = itertools.repeat(hr, n)
  
  population = [x for x in fhd] + [x for x in fhet] + [x for x in fhr]
  </code></pre>
  
  <p>which would result in:</p>
  
  <pre><code>[('A', 'A'), ('A', 'A'), ('A', 'a'), ('A', 'a'), ('A', 'a'), ('A', 'a'), ('A', 'a'), ('A', 'a'), ('A', 'a')]
  </code></pre>
  
  <p>Is there a more reasonable, pythonic or memory saving way to build the final list, e.g. without generating the lists of for the three types of individuals first?</p>