title: python random.sample stop sampling after all possible outcomes
body: <p>I am using random.sample to sample  all possible combinations of sets of data (about 150 sets). The sample sizes I will be testing are 3,4 and 5 and the sets of data range between 2 and 20 items.</p>
  
  <p>Each data point will be a string e.g. '101A'. I was going to just loop the random sampling 1000 times and store the points as a ordered concatenated string to cancel out duplicates.
  e.g.</p>
  
  <pre><code>d['2-101a-124'] = 0 
  </code></pre>
  
  <p>Then to extract the data then split the data by '-'s. Is there a better way of doing this? Limiting the number of times it randomly samples to obtaining all combinations? </p>
  
  <p>edit: Just for clarification I need all possible combinations of a list i.e.</p>
  
  <pre><code>dataset = ['1','2','3A','4']
  </code></pre>
  
  <p>when sampling 3 data points I need all combination, as in:</p>
  
  <pre><code>combination 1 = ['1','2','3A']
  combination 2 = ['2','3A','4']
  combination 3 = ['1','3A','4']
  combination 4 = ['1','2','4']
  </code></pre>