The frozenset function
The function frozenset transforms a set into immutable. In the function parameter we specify the set that we need to make immutable.
Syntax
pythonfrozenset(set)
Example
Let's make our set immutable:
pythonst = {'a', 'b', 'c'}
res = frozenset(st)
print(res)
Result of code execution:
pythonfrozenset({'a', 'b', 'c'})