I
Ian
asked

Expert
Abhay Jajodia answered
Hi Ian,
continue does not skip the loop condition. It only skips the rest of the code in the loop body for that one round, then the loop checks the condition again and moves to the next iteration.
Example:
for i in range(1, 6):
if i == 3:
continue
print(i) # prints 1, 2, 4, 5
If you have more questions, I am here to help.
C++
This question was asked as part of the Learn C++ Basics course.
Our Experts
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer
