MicrolearnENPTES

break and continue

Lesson 12 of 20 · Py.Micro

Leave a loop early or skip to the next round.

Looking for the first negative balance: once found, there is no need to keep going. break jumps right after the loop.

Check yourself

What does break do?

Do it in the browser: a real Python tool, a short mission and instant feedback. No install.

Start this lesson — free
← AccumulatingLists →

All lessons · Py.Micro