So far, each line of code that you have written gets executed exactly once and immediately after it is written. Compound statements are Python structures that allow you to control when and how certain pieces of code get executed. Compound statements significantly increase your expressiveness as a programmer. In other words, they allow you to do more with less code. Before introducing a few compound statements, it will be helpful to go over the syntactical structure.
Compound statements
Compound statement syntax and indentation level
A compound statement consists of two parts. The first part, the clause header, is a line containing the type of statement and some other information specific to the statement. The clause header...