{ { { { { { { true intersection union difference superset note that {is still dictionary in all pythons empty sets must be created with the set built-inand print the same ways { set(type({}empty sets print differently set( add( { initialize an empty set because {is an empty dictionary as in python and earliersets created with / literals support the same methodssome of which allow general iterable operands that expressions do not{ { { { [ typeerrorunsupported operand type(sfor |'setand 'list{ union([ ]{ { union({ }{ { union(set([ ]){ { intersection(( ){ { issubset(range(- )true immutable constraints and frozen sets sets are powerful and flexible objectsbut they do have one constraint in both and that you should keep in mind--largely because of their implementationsets can only contain immutable ( "hashable"object types hencelists and dictionaries cannot be embedded in setsbut tuples can if you need to store compound values tuples compare by their full values when used in set operationss { add([ ]typeerrorunhashable type'listonly immutable objects work in set other numeric types