Here's what I mean: if you found all possible 2-element combinations of [1,2,3,4], you would get [1,2], [1,3],[1,4],[2,3],[2,4] and [3,4]
What I want is groups of combinations that don't overlap and include all elements. So for example [[1,2],[3,4]] is an example of one "group", because the elements in both combinations do not overlap, and all possible elements are used. [[1,3],[2,4]] is an example of another "group"
By the way, I'm aware that itertools will allow me to print combinations themselves. So for example, the following code:
combinations = itertools.combinations([1,2,3,4], 2)
for c in combinations:
print(c)
will output:
(1, 2)
(1, 3)
(1, 4)
(2, 3)
(2, 4)
(3, 4)
But again, that's just giving me combinations. I want GROUPS of combinations that are mutually exclusive and exhaustive with the elements.
Also, I'm sure I'm not using the proper vocabulary. If there is a formal term for anything I'm describing, I would appreciate learning it.
Thanks in advance!