as mentioned previouslystatements in nested block of code are normally associated by being indented the same amount to the right as one special case herethe body of compound statement can instead appear on the same line as the header in pythonafter the colonif yprint(xthis allows us to code single-line if statementssingle-line while and for loopsand so on here againthoughthis will work only if the body of the compound statement itself does not contain any compound statements that isonly simple statements-assignmentsprintsfunction callsand the like--are allowed after the colon larger statements must still appear on lines by themselves extra parts of compound statements (such as the else part of an ifwhich we'll meet in the next sectionmust also be on separate lines of their own compound statement bodies can also consist of multiple simple statements separated by semicolonsbut this tends to be frowned upon in generaleven though it' not always requiredif you keep all your statements on individual lines and always indent your nested blocksyour code will be easier to read and change in the future moreoversome code profiling and coverage tools may not be able to distinguish between multiple statements squeezed onto single line or the header and body of one-line compound statement it is almost always to your advantage to keep things simple in python you can use the special-case exceptions to write python code that' hard to readbut it takes lot of workand there are probably better ways to spend your time to see prime and common exception to one of these rules in actionhowever (the use of single-line if statement to break out of loop)and to introduce more of python' syntaxlet' move on to the next section and write some real code quick exampleinteractive loops we'll see all these syntax rules in action when we tour python' specific compound statements in the next few but they work the same everywhere in the python language to get startedlet' work through briefrealistic example that demonstrates the way that statement syntax and statement nesting come together in practiceand introduces few statements along the way simple interactive loop suppose you're asked to write python program that interacts with user in console window maybe you're accepting inputs to send to databaseor reading numbers to be used in calculation regardless of the purposeyou need to code loop that reads one or more inputs from user typing on keyboardand prints back result for each in other wordsyou need to write classic read/evaluate/print loop program quick exampleinteractive loops