Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
367 B
1
Indexable
Never
#set operations

s1 = {1,2,3,4,5}

s2 = {6,7,8,9,10}

print("Union :",s1.union(s2))

print("Intersection :",s1.intersection(s2))

print("Difference :",s1.difference(s2))

print("Symmetric Difference :",s1.symmetric_difference(s2))

print("Symmetric Difference :",s1.symmetric_difference(s2))

#set comparision

print(s1==s2)

print(s1>s2)

print(s1<s2)

print(s1!=s2)