continue in python
- The continue statement brings back program control to the start of the loop. You can use it for both ‘for’ and ‘while’ loops.
- The continue statement is used less often than break. It causes the current iteration to end, and to “jump” to the beginning of the next. It basically means “skip the rest of the loop body, but don’t end the loop.”
- This can be useful if you have a large and complicated loop body and several possible reasons for skipping it. In that case, you can use continue.