I have a list of tuples that I want to get all the combinations for as a set and filter out certain sets based on criteria.

For example

```
pairs = [(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)]
combs = []
for i in range(len(pairs)):
        intermediate = (set(list(combinations(pairs, i))))
        if ((2,3) and (2,2) and (3,2)) in intermediate:
                combs.append(intermediate)

```

But it doesn't detect if any of the tuples are in the set, so I tried a more basic test version.

```
pairs = [(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)]
test = set(combinations(pairs,1))
if (1,1) in test:
        print("true")

```

This also doesn't work even though I can clearly see in my variable explorer that the set contains (1,1).

I've also tried adding an integer 1 as one of the elements in pairs and checking if 1 is in the set but that still doesn't work. I've run out of ideas and some help would be appreciated.