text_plain_output_1.png
A = {1, 2, 3, 4}
B = {3, 4, 5, 6}

C = A.intersection(B)
C = A & B
C

D = A.union(B)
D = A | B
D = B | A
D

SYM_DIF = A ^ B
SYM_DIF

SYM_DIF = A.symmetric_difference(B)
SYM_DIF

sym_dif = B ^ A
sym_dif