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 executed the subsequent statements in the loop are not executed. the continue statement can not be used without an enclosing for or a while loop.
Q.) Program to demonstrate the continue statement.
i=1;
while i<=10:
print(i);
if i==2
continue
i=i+1
Output
1 3 4 5 6 7 8 9 10