Sets
Sets
----------------------------------------------------------------------
#you cannot change its items, but you can add new items.
----------------------------------------------------------------------
#thisset = {"apple", "banana", "cherry", "apple", True,1,2}
#print(thisset)
#one will not print here bc it consider True as 1
---------------------------------------------------------------------
set1={"a","b","c",3}
set2={1,2,3}
set3= set1.union(set2)
#set4=set1.union(set2)
print(set3)
set1={"a","b","c"}
set2={1,2,3}
set1.update(set2)
print(set1)
---------------------------------------------------------------------
x.intersection_update(y)
print("Intersection Update",x)
x = {"apple", "banana", "cherry"}
y = {"google", "microsoft", "apple"}
z = x.intersection(y)
print(z)