The basics · Loops
Stopping early, and loops in loops
break, continue, and the n × n of a nested loop. · 10 minutes
Predict first
What does this print?
1for n in [4, 7, 10, 3]:2if n > 5:3break4print(n)
The basics · Loops
break, continue, and the n × n of a nested loop. · 10 minutes
Predict first
What does this print?
1for n in [4, 7, 10, 3]:2if n > 5:3break4print(n)