I have a list , guys = range(1,21)
and have gotten the unique combination of pairs using
itertools.combinations(guys,2)
I'm looking to create 19 sets using these subset pairs such that each value is listed only once in each set.
For example, the first set would be:
(1,2),(3,4),(5,6),(7,8),(9,10),(11,12),(13,14),(15,16),(17,18),(19,20)
And the following 18 sets would be similar, a unique set with 10 of these combination pairs where each number is only used once.
For example, if this were for range(4)
, the total answer would be:
[(0,1),(2,3)], [(0,2),(1,3)], [(0,3),(1,2)]
I don't really even know where to begin.