Continue Statement

Continue Statement

Continue statement unlike the break statement is used to skip the remaining part of a loop and start with next iteration.



The working of continue statement in for and while loop is shown below.

Example : Program to illustrate the use of continue statement inside for loop

for word in “Jump Statement”:
if word = = “e”:
print (word, end=”)
print (“\n End of the program”)


Jump Statement

End of the program

The above program is same as the program we had written for ‘break’ statement except that we have replaced it with ‘continue’. As you can see in the output except the letter ‘e’ all the other letters get printed.

Python : Continue Statement Program List