0 votes
in Python by

What are immutable objects in Python?

1 Answer

0 votes
by

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.

Related questions

0 votes
asked Jan 3 in Python by DavidAnderson
0 votes
asked Jan 3 in Python by DavidAnderson
...