else block if all of the conditions are falseif print 'it' negativeelif = print 'equal to zeroelif print 'positive but smaller than elseprint 'positive and larger than or equal to if any of the conditions is trueno further elif or else blocks will be reached with compound condition using and or orconditions are evaluated left-to-right and will short circuitin [ ] in [ ] in [ ]if dprint 'made itmade it in this examplethe comparison never gets evaluated because the first comparison was true for loops for loops are for iterating over collection (like list or tupleor an iterater the standard syntax for for loop isfor value in collectiondo something with value for loop can be advanced to the next iterationskipping the remainder of the blockusing the continue keyword consider this code which sums up integers in list and skips none valuessequence [ none none total for value in sequenceif value is nonecontinue total +value for loop can be exited altogether using the break keyword this code sums elements of the list until is reachedsequence [ total_until_ for value in sequenceif value = break total_until_ +value the basics www it-ebooks info