Python 3 using Continue in Loops

Screen Shot 2022-07-06 at 11.38.13 PM

Hello. I’m new to programming.

Can someone please explain to me the benefit of using “continue”. Is it faster run-time? Should Is it just a tool that can be helpful sometimes? Thanks for letting me know

1 Like

Hi,
It’s a tool that can be helpful sometimes.
As your code gets more complicated it’s a lot easier to keep what you can as simple and straightforward as possible.
So, while you may be able to refactor the code so it doesn’t use continue, you may end up making the code more complicated and harder to follow - making it easier to make mistakes and harder to debug.

2 Likes