Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Set symmetric Using Python Set symmetric_difference() Method

# Set X
X = {1, 2, 3}

# Set Y
Y = {2, 3, 4}

# Set Z
Z = {2, 3, 4}

print("Symmetric difference between X & Y", X.symmetric_difference(Y))
print("Symmetric difference between Y & Z", Y.symmetric_difference(Z))
print("Symmetric difference between X & X", X.symmetric_difference(X))
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Set #symmetric #Using #Python #Set #Method
ADD COMMENT
Topic
Name
5+6 =