title: How can I group the items in a list in sorted order?
body: <p>I have some list that consist of a tuples like this</p>
  
  <pre><code>one = [(4, 'a'), (3, 'b'), (2, 'c'), (3, 'd'), (5, 'e'), (6, 'f')]
  </code></pre>
  
  <p>and i want to group item on list one based on that integer to create new array that has an output like this</p>
  
  <pre><code>final = [(g1, 2, ['c']), (g2, 3, ['b','d']), (g3, 4, ['a']), (g4, 5, ['e']), (g5, 6, ['f'])]
  </code></pre>
  
  <p>I have no idea in creating the final list. How is python doing that? Any ideas would be appreciated. Thank you.</p>
  
  <p><strong>Note:</strong> g1, g2, and so on is just some string with increment.</p>