How "continue" works? Somebody please help me out. | Sololearn: Learn to code for FREE!

+1

How "continue" works? Somebody please help me out.

I don't want to continue learning Python without knowing this. Please somebody tell my how "continue" works.

9/18/2016 1:29:28 PM

Wætrb4II

5 Answers

New Answer

+2

continew 会让当前的迭代结束,"跳"到下一轮循环开始。

+2

Thanks!

+2

Thank you!

+1

There are two loop controls, break and continue. break will stop a loop and execute code after the loop. continue is used when you do not want to break out of the loop entirely. Instead you want to stop somewhere in the middle of the loop, ignore code after the continue statement, and go back to the top of the loop where you evaluate the condition for execution of the loop and if the condition is still True, you will continue in loop.

+1