both = {'a', 'A', 'b', 'B'} some = {'a', 'b', 'c'} result1 = both & some # result: {'a', 'b'} result2 = both.intersection(some) print(result1 == result2) # True