Python Continue Statement

The continue statement is used in a loop to go back to the beginning of the loop. It means, when continue is executed, the next repetition will start. When continue is executed, the subsequent statements in the loop are not executed. .

The syntax of continue statement is given below:

looping structure
{
  if(particular itraticve value)
  {
     continue:   
  }
}
							
							

Sample program:A Python program to display numbers from 1 to 5 using continue statement.

x = 0 
while x<10: 
    x+=1 
    if x>5:
      continue 
    print ('x=', x) 
print("Out of loop")