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. .
syntax of continue :
Copied
looping structure
{
if(particular itraticve value)
{
continue:
}
}
continue statement example:
Sample program:A Python program to display numbers from 1 to 5 using continue statement.
Copied
x = 0
while x<10:
x+=1
if x>5:
continue
print ('x=', x)
print("Out of loop")