(continued from previous page len(singleton singleton ('hello',the statement 'hello!is an example of tuple packingthe values and 'hello!are packed together in tuple the reverse operation is also possiblexyz this is calledappropriately enoughsequence unpacking and works for any sequence on the right-hand side sequence unpacking requires that there are as many variables on the left side of the equals sign as there are elements in the sequence note that multiple assignment is really just combination of tuple packing and sequence unpacking sets python also includes data type for sets set is an unordered collection with no duplicate elements basic uses include membership testing and eliminating duplicate entries set objects also support mathematical operations like unionintersectiondifferenceand symmetric difference curly braces or the set(function can be used to create sets noteto create an empty set you have to use set()not {}the latter creates an empty dictionarya data structure that we discuss in the next section here is brief demonstrationbasket {'apple''orange''apple''pear''orange''banana'print(basketshow that duplicates have been removed {'orange''banana''pear''apple''orangein basket fast membership testing true 'crabgrassin basket false demonstrate set operations on unique letters from two words set('abracadabra' set('alacazam' unique letters in {' '' '' '' '' ' letters in but not in {' '' '' ' letters in or or both {' '' '' '' '' '' '' '' ' letters in both and {' '' ' letters in or but not both {' '' '' '' '' '' 'similarly to list comprehensionsset comprehensions are also supporteda { for in 'abracadabraif not in 'abc' {' '' ' sets