5.6. Sequence Unordered

5.6.1. Both

  • unordered

  • impossible to getitem and slice

  • unique elements

  • only hashable elements

5.6.2. Frozenset

  • immutable

5.6.3. Set

  • mutable

5.6.4. Memory Footprint

>>> from sys import getsizeof
>>>
>>>
>>> a = {1, 2, 3}
>>> b = frozenset({1, 2, 3})
>>>
>>> getsizeof(a)
216
>>>
>>> getsizeof(b)
216