MemotivaVariables, references, and memory model

What is the difference between mutable and immutable objects?

Variables, references, and memory model

Audio flashcard · 0:17

Nortren·

What is the difference between mutable and immutable objects?

0:17

Immutable objects cannot be changed after creation. Examples include int, float, str, tuple, frozenset, and bytes. Mutable objects can be changed in place. Examples include list, dict, set, and bytearray. Mutability affects how objects behave when shared between variables and passed to functions.
docs.python.org