operator in len <use in(setlen(setset set set set set set set <set explanation set membership returns the cardinality ( the lengthof the set returns new set with all elements from both sets returns new set with only the elements common to both sets returns new set with all items from the first set not in second asks whether all elements of the first set are in the second table operations on set in python my_tuple[ ]=false traceback (most recent call last)file ""line in my_tuple[ ]=false typeerror'tupleobject does not support item assignment set is an unordered collection of zero or more immutable python data objects sets do not allow duplicates and are written as comma-delimited values enclosed in curly braces the empty set is represented by set(sets are heterogeneousand the collection can be assigned to variable as below { , ,"cat", ,false{false 'cat'my_set { , ,"cat", ,falsemy_set {false 'cat'even though sets are not considered to be sequentialthey do support few of the familiar operations presented earlier table reviews these operations and the following session gives examples of their use my_set {false 'cat'len(my_set false in my_set true "dogin my_set false sets support number of methods that should be familiar to those who have worked with them in mathematics setting table provides summary examples of their use follow note that unionintersectionissubsetand difference all have operators that can be used as well introduction