AI engineering glossary · Python core
What is mutable?
Mutable: Describes an object that can be changed in place after it is created, without making a new object. Lists, dictionaries and sets are mutable in Python. Mutability matters because several names can share one object, so a change through one name is visible through the others.
Mutable: an example
a = [1, 2]; b = a; b.append(3) makes a equal to [1, 2, 3] too, because both names point to the same list.
Related terms
More Python core terms
- Mutable default argument
- Namespace
- Negative indexing
- None
- Operator
- Operator precedence
- pass
- Pass by object reference
Where you learn it
Mutable is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.