Python's Memory Model Is Not What You Think It Is
Ask most Python developers how Python stores a variable and they will say "it stores the value." This is imprecise in a way that causes real bugs and real confusion in interviews. A precise mental model of how Python stores and retrieves data changes how you read and write code.
Python does not store values in variables. Python binds names to objects.
The distinction sounds philosophical until you trace code that involves mutation, function arguments, or aliasing. Then it becomes the most practically useful concept in the language.
Names Are Not Boxes






