title: Python: how to create a list of lists with increasing length, made of random numbers?
body: <p>Say I have a list of 200 positive, unique, random integers called <code>masterlist</code>. </p>
  
  <p>I want to generate a list of 10 lists called <code>container</code> so that: <code>l1</code> has 2 random numbers coming from <code>masterlist</code>, repetitions excluded; <code>l2</code> has 4 elements, <code>l3</code> has 6 elements, and so forth.</p>
  
  <p>I know I can create my <code>container</code> list like this:</p>
  
  <pre><code>comb=[[] for i in range(10)]
  </code></pre>
  
  <p>and that I can select a random value from a list using <code>random.choice()</code>. </p>
  
  <p>What is the best Pythonic way to nest the populating process of these 10 lists, so that I create one list, append the correct number of values checking that there are no repetitions, and proceed on to the next?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>This is my attempt:</p>
  
  <pre><code>comb=[[] for i in range(10)]
  for j in range(1,11):
      for k in range(0,2*j):
          comb[j][k].append(random.choice(masterlist))
  </code></pre>
  
  <p>What is wrong with this?</p>