Learn python break and continue statements with the help of flowcharts and examples.

break and continue are known as jump statement because it is used to change the regular flow of the program, loops, etc. when a particular condition is met.

Let’s see both statements one by one in detail.

The break statement is used to terminate the execution of the current loop when a particular condition is met.

Syntax: break

From the Flowchart, we understand it if a particular condition is met then the break statement terminates the execution of the current loop.

1 2 3 4 5 end of the for-loop

The continue statement help in skipping a particular iteration of the current loop when a particular condition is met.

Syntax: continue

From the Flowchart, we understand it if a particular condition is met then the continue statement skips a particular iteration of the current loop.

1 2 4 5