Te same elementy dwóch zestawów w Pythonie
x = {2, 3, 5, 6}
y = {1, 2, 3, 4}
z = x.intersection(y)
Bst Barracuda
x = {2, 3, 5, 6}
y = {1, 2, 3, 4}
z = x.intersection(y)