Sets are unordered collections of unique elements.
In [1]:
myset = set()
In [2]:
myset
Out[2]:
In [3]:
myset.add(1)
In [4]:
myset
Out[4]:
In [5]:
myset.add(1)
In [6]:
myset
Out[6]:
In [7]:
myset.add(0)
In [8]:
myset
Out[8]:
In [9]:
myset.add('mississippi')
In [10]:
myset
Out[10]:
In [12]:
myset.add(22222222)
In [13]:
myset
Out[13]:
In [15]:
set('mississippi').sort()
In [ ]: