demo_ref_set_intersection.py:
x = {"apple", "banana", "cherry"} y = {"google", "microsoft", "apple"} z = x.intersection(y) print(z)
➜ begtut>python demo_set_intersection.py
{'apple'}