A = {1, 2, 3, 4} B = {3, 4, 5, 6, 7} print(A.intersection(B)) # Saída: {3, 4} print(A & B) # Saída: {3, 4}