sscasc@tumkur break and continue in loops break statementwhen break statement executes inside loopcontrol flow comes out of the loop immediatelyexample:to demonstrate break while print(iif = print("breaking from loop"break + the loop conditional will not be evaluated after the break statement is executed note that break statements are only allowed inside loops break statement inside function cannot be used to terminate loops that called that function executing the following prints every digit until number when the break statement is met and the loop stopsoutput breaking from loop break statements can also be used inside for loopsthe other looping construct provided by pythonexamplefor in ( )print(iif = break executing this loop now prints note that and are not printed since the loop has ended continue statement continue statement will skip to the next iteration of the loop bypassing the rest of the current block but continuing the loop continue can only used inside loopsexample to demonstrate continue for in ( )if = or = continue print(inote that and aren' printedthis is because continue goes to the next iteration instead of continuing on to print(iwhen = or = sp_python programming