Python frozenset() built-in function

From the Python 3 documentation

Return a new frozenset object, optionally with elements taken from iterable. frozenset is a built-in class. See frozenset and Set Types — set, frozenset for documentation about this class.

Examples

>>> frozenset([1, 2, 3])
# frozenset({1, 2, 3})

>>> frozenset({1, 2, 3})
# frozenset({1, 2, 3})

>>> frozenset((1, 2, 3))
# frozenset({1, 2, 3})

Subscribe to pythoncheatsheet.org

A bullshit free publication, full of interesting, relevant links.