What are immutable objects in Python?

Technology CommunityCategory: PythonWhat are immutable objects in Python?
VietMX Staff asked 3 years ago

An object with a fixed value. Immutable objects include numbers, strings and tuples. Such an object cannot be altered. A new object has to be created if a different value has to be stored. They play an important role in places where a constant hash value is needed, for example as a key in a dictionary.