Interview Question

What is continue statement?

continue skips to the next iteration of the nearest loop.

💡 Concept ✅ Quick Revision 🐍 Python

Answer

The continue statement skips the rest of the current loop iteration. • Execution proceeds with the next iteration. • It applies to the nearest enclosing loop. • It does not end the loop completely.

💡 Simple Example

for number in range(4): if number % 2: continue print(number)

Output

0 2

⚡ Quick Revision

continue skips to the next iteration of the nearest loop.