Python continue statement

Python continue keyword is used to skip the execution of the current iteration of a loop upon fulfillment of some condition and continue to the next iteration. As a developer, you may use the continue keyword to skip code execution, makes it jump back to the top of the loop, and continue with the next item.

The following example uses the continue statement inside the for loop.

			

for num in range(45,55):
   if num == 51:
       continue
   print(num)

				

Output:

45 46 47 48 49 50 52 53 54 55