title: Python generate all unique permutations and no sorted repeats [Fixed, I meant to look for combinations]
body: <p>Edit: I confused the difference between permutations and combinations. Edited the question just to keep it up (as I can't delete it). Though I realized my mistake.</p>
  
  <p>I've been browsing this question around for a bit and I couldn't find a solution that fits uniquely to what I'm looking for. </p>
  
  <p>The basic concept is if I ran a function <code>gen_permutations([1,2])</code> to generate permutations. I would get the result <code>([1,2],[2,1])</code>, though in this result, I would classify they are the same set.</p>
  
  <p>I would think of checking something as <code>result[0] &lt; result[1]</code> then add it to the set of results. Though, how would this be scaled up for example <code>gen_permutations(input, size=n | n &lt;= len(input))</code>?</p>
  
  <p>Sorry if there's a question answered to this, but all "Similar Questions" point me to just "unique results" where [1,2] != [2,1].</p>
  
  <p>Edit: Case for confusion, the function <code>gen_permutations</code> is  just a generic generator that I found and used here <a href="https://stackoverflow.com/questions/104420/how-to-generate-all-permutations-of-a-list-in-python?rq=1">How to generate all permutations of a list in Python</a></p>
  
  <p>Another example to make it bigger. I could run this case</p>
  
  <pre><code>for i in permutations([1,2,3,4],3):
      print i
  </code></pre>
  
  <p>Gets the result 
  <code>(1, 2, 3), (1, 2, 4),(1, 3, 2),(1, 3, 4),(1, 4, 2),(1, 4, 3),(2, 1, 3),(2, 1, 4),(2, 3, 1),(2, 3, 4),(2, 4, 1),(2, 4, 3),(3, 1, 2),(3, 1, 4),(3, 2, 1),(3, 2, 4),(3, 4, 1),(3, 4, 2),(4, 1, 2),(4, 1, 3),(4, 2, 1),(4, 2, 3),(4, 3, 1),(4, 3, 2)</code></p>
  
  <p>Though <code>(1,2,3)</code> and <code>(3,2,1)</code> I would consider not unique. Since if you reordered them they would be the same set. I need help to code a generator of permutations that would not generate the result <code>(3,2,1)</code> as <code>(1,2,3)</code> was already generated.</p>