I am trying to list out all the possible combinations of groups of 3 that one can make of 6 people. (A, B, C, D, E, F)
- The order doesn't of the group doesn't matter
- The order of the pair doesn't matter
Possible combinations:
{(B,D),(C,E),(G,H)}
{(B,C),(D,E),(G,H)}
{(B,E),(C,D),(G,H)}
I could only get as far to write:
from itertools import combinations
x = combinations('ABCDEF', 2)
z = [y for y in x]
I have no idea on how I should create combinations out of combinations, the docs is not to much help. I think I have to someone create an algorithm from scratch.
- I know that there should be 15 total combinations to list