continue in Python
continue skips the rest of this loop round and jumps to the next item. The loop does not end. Useful to ignore zeros, empty names, or a value you don’t want to print. for n in [1, 0, 2]: if n == 0: continue; print(n) → 1 then 2. Zero never prints, but 2 still does.
break would have stopped after zero and never printed 2. Same loop, two keywords, two outputs — that comparison is the viva.
continue in Python — output — 1, 2, 4, 5. 3 is skipped.
Exam tip
continue skips; break exits.