+ 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.

18th Sep 2016, 1:29 PM
Wætrb4II
Wætrb4II - avatar
5 Respuestas
+ 2
continew 会让当前的迭代结束,"跳"到下一轮循环开始。
18th Sep 2016, 1:37 PM
liushi
+ 2
Thanks!
18th Sep 2016, 1:49 PM
Wætrb4II
Wætrb4II - avatar
+ 2
Thank you!
18th Sep 2016, 6:43 PM
Wætrb4II
Wætrb4II - avatar
+ 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.
18th Sep 2016, 6:38 PM
Frank Columbus
+ 1
thanks
19th Sep 2016, 4:22 PM
Wai Hlyan Htun
Wai Hlyan Htun - avatar