0

Is someone knows how can I code this on python? I know this should not been ask but I literally confused on how can I code this illustration, still don't have the idea where to start, can anyone help me?

enter image description here

This is the given question

unordered collection of unique objects

a = {100, 3.12, False, "Bye"}
b = {100, 3.12, False, "Welcome"}

Set of operations

#Convert  a list to a set
my_set = set([1,1,2,3])


#Add an item to the set
a.add(4)

#Remove an item from a set
a.remove("Bye")

#Returns set a minus b
a.difference(b)

#Returns intersection of set a and b
a.intersection(b)

#Returns the union of set a and b
a.union(b)

#Returns True if a is a subset of b, false otherwise
a.issubset(b)

#Returns True if a is superset of b, false otherwise
a.issuperset(b)

0 Answers0