title: Python convert a list of 4 tuple into three 2 tuples, joined on the last element in the tuple
body: <p>From a django query values_list() I have a list of 4 tuples, ie</p>
  
  <p><code>[('AAA', '123', 'xyz', '111'), ('BBB', '456', 'uvw', '222'), ...]</code></p>
  
  <p>What I Want is a multiple lists of two tuples, joined on the last element of each tuple, ie</p>
  
  <p><code>[('AAA', '111'), ('BBB', '222'), ...]</code></p>
  
  <p><code>[('123', '111'), ('456', '222'), ...]</code></p>
  
  <p><code>[('xyz', '111'), ('uvw', '222'), ...]</code></p>
  
  <p>I have it working by executing multiple queries in django and getting a values list for the first column with the second one</p>
  
  <p>(myQuery).values_list('col1', 'idCol')</p>
  
  <p>(myQuery).values_list('col2', 'idCol')</p>
  
  <p>(myQuery).values_list('col3', 'idCol')</p>
  
  <p>This solution, however, executes multiple queries, which I dont think is as good for performance. </p>
  
  <p>so I was wondering if there is a way to do what I showed above, converting a list of 4 tuples to three lists of 2 tuples, so that I can use a singe query, and select all of the values at once</p>
  
  <p>Sorry for the ambiguity, hopefully this gives an idea of what I want to accomplish,</p>
  
  <p>Thanks!</p>