Part III. Statements and Syntax

In Part III, we study Python’s procedural statement set: statements that select from alternative actions, repeat operations, print objects, and so on. Since this is our first formal look at statements, we will also explore Python’s general syntax model. As we’ll see, Python has a familiar and simple syntax model, though we often type much less in Python statements than in some other languages.

We’ll also meet the boolean expressions in conjunction with conditional statements and loops, and learn about Python documentation schemes while studying the syntax of documentation strings and comments. At an abstract level, the statements we’ll meet here are used to create and process the objects in Part II. By the end of this part, you will be able to code and run substantial Python program logic.

Get Learning Python, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.