immutable sets python has an immutable set type called frozenset it works pretty much exactly like set apart from not allowing methods or operations that change values such as the add(or clear(methods there are several ways that this immutability can be useful for examplesince normal sets are mutable and therefore not hashablethey cannot be used as members of other sets the frozenseton the other handis immutable and therefore able to be used as member of setalso the immutable property of frozenset means we can use it for key to dictionaryfor examplemodules for data structures and algorithms in addition to the built-in typesthere are several python modules that we can use to extend these built-in types and functions in many casesthese python modules may offer efficiency and programming advantages that allow us to simplify our code