Pankaj Kumar

I have been working on Python programming for more than 12 years. At AskPython, I share my learning on Python with other fellow developers.

Python continue Statement

Python continue statement is used to skip the execution of the current iteration of the loop. We can’t use continue statement outside the loop, it will throw an error as “SyntaxError: ‘continue’ outside loop“. We can use continue statement with for loop and while loops. If the continue statement is present in a nested loop, it skips the execution

Python continue Statement Read More »

Python break Statement

The break statement in Python is used to get out of the current loop. We can’t use break statement outside the loop, it will throw an error as “SyntaxError: ‘break’ outside loop“. We can use break statement with for loop and while loops. If the break statement is present in a nested loop, it terminates

Python break Statement Read More »