languages/what-a-variable-really-is-python-names-values-and-the-sign.md
What a variable really is: Python names, values and the = sign
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.
$ ls languages/
see all →
languages/why-does-0-1-0-2-give-0-30000000000000004-in-python.md
Why does 0.1 + 0.2 give 0.30000000000000004 in Python?
Type 0.1 + 0.2 into Python and you get 0.30000000000000004. It is not a bug: computers store fractions in binary, and one tenth has no…
languages/why-does-my-javascript-loop-run-one-time-too-many.md
Why does my JavaScript loop run one time too many?
A loop tells JavaScript to repeat some code until a condition says stop. A for loop packs three pieces onto one line: a setup that runs…