Assignment gives a value a name so you can use it later without calculating it again. In Python, `=` means “assign,” not “is mathematically equal to.” For a basic variable assignment, put the name on the left and a value or expression on the right. section 4.0 section 4.1
Calculate, then name the result
`a = 1` `b = 2` `c = a + b` The first two lines assign values to `a` and `b`. On the third line, Python uses those values to calculate `1 + 2`, then assigns the result, `3`, to `c`. An assignment is a statement; the expression `a + b` supplies its value. section 4.1 section 5.3
The first assignment to a variable initializes it: it binds the name to an object. You can later reassign the same name, as in `c = a - b`. The name then refers to the new object. Reassigning a name that refers to an immutable object does not change the old object. section 4.2 section 24.1
Assignment can also replace an element in a mutable list. If `colors = ["red", "blue", "yellow"]`, then `colors[0] = "orange"` changes the first element of that list. This differs from assigning a different object to the name `colors`. Take care when two names refer to the same mutable object: a change through one name is visible through the other. section 25.6 section 28.3
Quick check: after `a = 1`, `b = 2`, and `c = a + b`, what value does `c` have? What would it have after `c = a - b`? Assigning intermediate results like these helps turn a conversion formula into a small program. section 4.2 section 6.6






