languages/what-a-variable-really-is-python-names-values-and-the-sign.md

What a variable really is: Python names, values and the = sign

Programming languages · 7 min read ·

In Python, a variable isn't a box that holds a value. It's a name tag tied to a value that lives on its own.

That one picture explains why age = age + 1 makes perfect sense, why = is an instruction rather than a statement of fact, and why changing a list through one name can quietly change it under another name too.

Step through two tiny programs and watch the names and values move, test your own variable names against Python's rules, then finish with a four-question check.