there can be zero or more elif clausesand the final else clause is optional if we want to account for particular casebut want to do nothing if it occurswe can use pass as that branch' suite the first thing that stands out to programmers used to +or java is that there are no parentheses and no braces the other thing to notice is the colonthis is part of the syntax and is easy to forget at first colons are used with elseelifand essentially in any other place where suite is to follow unlike most other programming languagespython uses indentation to signify its block structure some programmers don' like thisespecially before they have tried itand some get quite emotional about the issue but it takes just few days to get used toand after few weeks or monthsbrace-free code seems much nicer and less cluttered to read than code that uses braces since suites are indicated using indentationthe question that naturally arises is"what kind of indentation?the python style guidelines recommend four spaces per level of indentationand only spaces (no tabsmost modern text editors can be set up to handle this automatically (idle' editor does of courseand so do most other python-aware editorspython will work fine with any number of spaces or with tabs or with mixture of bothproviding that the indentation used is consistent in this bookwe follow the official python guidelines here is very simple if statement exampleif xprint(" is nonzero"in this caseif the condition (xevaluates to truethe suite (the print(function callwill be executed if lines print("small"elif lines print("medium"elseprint("large"this is slightly more elaborate if statement that prints word that describes the value of the lines variable the while statement the while statement is used to execute suite zero or more timesthe number of times depending on the state of the while loop' boolean expression here' the syntax