the parentheses also make things clearer for human readers conditional expressions can be used to improve messages printed for users for examplewhen reporting the number of files processedinstead of printing " file( )"" file( )"and similarwe could use couple of conditional expressionsprint("{ file{ }format((count if count ! else "no")("sif count ! else ""))this will print "no files"" file"" files"and similarwhich gives much more professional impression looping |python provides while loop and for in loopboth of which have more sophisticated syntax than the basics we showed in while loops here is the complete general syntax of the while loopwhile boolean_expressionwhile_suite elseelse_suite the else clause is optional as long as the boolean_expression is truethe while block' suite is executed if the boolean_expression is or becomes falsethe loop terminatesand if the optional else clause is presentits suite is executed inside the while block' suiteif continue statement is executedcontrol is immediately returned to the top of the loopand the boolean_expression is evaluated again if the loop does not terminate normallyany optional else clause' suite is skipped the optional else clause is rather confusingly named since the else clause' suite is always executed if the loop terminates normally if the loop is broken out of due to break statementor return statement (if the loop is in function or method)or if an exception is raisedthe else clause' suite is not executed (if an exception occurspython skips the else clause and looks for suitable exception handler--this is covered in the next section on the plus sidethe behavior of the else clause is the same for while loopsfor in loopsand try except blocks let' look at an example of the else clause in action the str index(and list index(methods return the index position of given string or itemor raise valueerror exception if the string or item is not found the str find(