How can I create unique non-repeating pair combinations from a list
<p>I am new to computer programming.  </p>

<p>I want to create successive 2-person teams from an even numbered list of players (32 max) but with no repeats until all possible teams have been formed.  </p>

<p>For example for 6 players (a thru f) I can generate with itertools.combinations 15 distinct teams. Then I can manually, on paper, in a matrix create 5 sets of 3 unique teams(i.e. [['a','b'],['c','d'], ['e','f']], and similarly ac,bf,de; ae,bc,df; af,bd,ce and ad,be,cf). But I've been unable to write a program (many varied attempts) in python 3.5 to do this. After 5 or fewer iterations I get repeats and some possible teams are not created at all.</p>

<p>I did a search but cannot quite discern which solution applies in my specific case.</p>

<p>If all you need is <em>some</em> complete round-robin pairing, then look up solutions with "round-robin tournament schedule".  You can likely just use the long-known solution illustrated well on <a href="https://en.wikipedia.org/wiki/Round-robin_tournament" rel="nofollow">Wikipedia</a>.</p>

<p>List the players in two rows, half of them in each row, like so:</p>

<pre><code>A  B  C
D  E  F
</code></pre>

<p>You first pairings are AD, BE, CF.  Next, nail <strong>A</strong> in place, and consider the others as a ring:</p>

<pre><code>A   B  C
   D    F
     E
</code></pre>

<p>Rotate the ring clockwise one position ...</p>

<pre><code>A   D  B
   E    C
     F
</code></pre>

<p>... flatten the lower three into one row again:</p>

<pre><code>A  D  B
E  F  C
</code></pre>

<p>Your second round pairings are AE, DF, BC.
Continue this for a total of five rotations; the last one recovers the original pairings.</p>

python itertools