controlling execution with the break statement life is often about exceptions to the rule for exampleyou might want an assembly line to produce number of clocks howeverat some pointthe assembly line runs out of needed part if the part isn' availablethe assembly line must stop in the middle of the processing cycle the count hasn' completedbut the line must be stopped anyway until the missing part is restocked interruptions also occur in computers you might be streaming data from an online source when network glitch occurs and breaks the connectionthe stream temporarily runs dryso the application runs out of things to do even though the set number of tasks isn' completed the break clause makes breaking out of loop possible howeveryou don' simply place the break clause in your code -you surround it with an if statement that defines the condition for issuing break the statement might say something like thisif the stream runs drythen break out of the loop in this exampleyou see what happens when the count reaches certain level when processing string the example is little contrived in the interest of keeping things simplebut it reflects what could happen in the real world when data element is too long to process (possibly indicating an error conditionthis example also appears with the downloadable source code as forbreak py open python file window you see an editor where you can type the example code type the following code into the window -pressing enter after each linevalue input("type less than characters"letternum for letter in valueprint("letter "letternumis "letterletternum+= if letternum print("the string is too long!"break