Python continue statement

The continue statement is used to skip rest of code inside a loop for current iteration only. Loop is not terminated but continues on with next iteration. The python use continues statement to bring the program control to beginning of the loop. Mainly it is used for a particular condition inside the loop so that we can skip some code for a specific condition. While skipping to next iteration the current iteration will be disturbed but program will return to top of loop. The continue statement in python returns control to beginning of while loop. It rejects all the remaining statements in the current iteration of loop and move the control back to top of loop.

Syntax:-
#loop statement
continue
          #the code to be skipped  

Flowchart:-

python continue statement

 

 

Example:-
  for char in’java’:
  if(char==v):
  pass
  print(“”,char)

O/p:-
j
a
v
a

Additional Services : Refurbished Laptops Sales, Python Classes, Share Market Classes And SEO Freelancer in Pune, India