2. Syntax and Types#
This chapter builds the basic vocabulary of Python programs: names, values, operators, built-in functions, and types.
Variables and assignment
Operators and expressions
Built-in functions
Basic scalar types
Collection type overview
Video
This overview introduces numeric data, arithmetic operators, comparisons, and basic type conversion.
Learning Goals
By the end of this chapter, you will be able to:
Create and name variables using Python assignment syntax
Use arithmetic, comparison, logical, and assignment operators
Classify values by built-in type
Use common built-in functions to inspect and transform values
Choose appropriate basic and collection types for simple data