Conclusion
This chapter introduced the smallest pieces of Python programs: names, values, and types.
You learned that assignment connects a name to a value. Reassignment changes
what a name refers to from that point forward. Numbers support arithmetic.
Strings store text. Booleans represent yes-or-no answers. None represents an
intentional absence of a value. Expressions produce values, and statements do
work.
The debugging habit from this chapter is simple:
print(type(value))
Use it when a value behaves differently from what you expected.
What Comes Next
The next chapter adds branches and loops. Branches use booleans to choose what happens. Loops repeat work over values.
Before moving on, make sure you can:
- assign a value to a name
- predict a reassignment
- distinguish
"8"from8 - use
True,False, andNone - identify the value produced by a small expression
- inspect a type with
type()
These are small moves. They become the vocabulary of every later program.