Python Day 2: Variables Don't Store Values (Python Memory Model)

If you think x = 10 means “x stores 10”… you are already misunderstanding Python. Today, we fix that. Today’s Goal By the end of today, you will: Understand how Python stores data in memory Learn references vs values Understand mutability Avoid hidden bugs The Illusion You write: x = 10 y = x You think: x and y both store 10 Wrong. What Actually Happens Memory: [10] ← object x ─────┐ ├──→ [10] y ─────┘ Variables do not store values. They store references to objects. ...

April 24, 2026 · 2 min · Nitin S Kulkarni