MemotivaVariables, references, and memory model

How does variable assignment work in Python?

Variables, references, and memory model

Audio flashcard · 0:13

Nortren·

How does variable assignment work in Python?

0:13

In Python, variables are names bound to objects in memory. Assignment does not copy values; it binds a name to the same object. When you write a equals b, both names refer to the exact same object until one of them is reassigned.
docs.python.org