I have list `a`:

```
a = [0,1,2,3,4,5]

```

Then I create all three-element combinations of this list. The results are grouped in sublistach because of matching to the equivalent in the form of a binary 3-bit string. For example, the result `[0,4,5]` corresponds to the sequence `001`, because each even number corresponds to 0, and the odd number 1.

The code I use with the comments:

```
import itertools as it
import itertools

# I create three-element combinations of zeros and ones
combinations_3bit = list(map(list, itertools.product([0,1], repeat=3)))
# output: [[0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 1], [1, 0, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1]]

# I create a list of strings with values from the list `3bit_combinations`
a=[]
for i in range(len(combinations_3bit)):
    a2 =''.join(map(str, [1 if x%2 else 0 for x in combinations_3bit[i]]))
    a.append(a2)
# output: ['000', '001', '010', '011', '100', '101', '110', '111'] 

# I remove repetitions in pairs of type 001 with 100, 011 with 110, etc.
combinations_3bit_without_repetition = [v for k, v in enumerate(a) if v[::-1] not in a[:k]] 
# output: ['000', '001', '010', '011', '101', '111'] 

b = [0,1,2,3,4,5]

good = []
for i in range(len(combinations_3bit_without_repetition)):
    c=[]
    for u in it.combinations(b, 3):       
        u1 = list(u)                  
        y =''.join(map(str, [1 if x%2 else 0 for x in u1]))
        if y == combinations_3bit_without_repetition[i]:
           c.append(u1)
    good.append(c) 

# output: [[[0, 2, 4]], [[0, 2, 3], [0, 2, 5], [0, 4, 5], [2, 4, 5]], [[0, 1, 2], [0, 1, 4], [0, 3, 4], [2, 3, 4]], [[0, 1, 3], [0, 1, 5], [0, 3, 5], [2, 3, 5]], [[1, 2, 3], [1, 2, 5], [1, 4, 5], [3, 4, 5]], [[1, 3, 5]]]

```

Can this be solved nicer and more economically?
Because the above solution seems to be "around" and for example the function `it.combinations` returns after each index`i` from the list `combinations_3bit_without_repetition` all possible combinations, and only then the condition screens only the matching ones. In the case of large lists, this solution is weak;)