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