#!/usr/bin/python3 # -*- coding: utf-8 -*- """ A frozen set is just a set, but immutable: list (mutable) is to tuple (immutable) as set (mutable) is to frozenset (immutable) """ from typing import Set, FrozenSet help(frozenset) pointlessfrozenset = frozenset() filled_set: Set[int] = {1, 1, 3, 5, 5, 5, 7} my_frozen_set: FrozenSet[int] = frozenset(filled_set) print("Type: my_frozen_set.add(8)") # my_frozen_set.add(8) # AttributeError: 'frozenset' object has no attribute 'add' # Despite what you might guess, given the syntax, # This is not a set, or a frozenset, # but instead our next data structure, the dictionary: y = {} print(type(y))