Branches and loops
If and else
Use 'if', 'elif', and 'else' to choose which block runs.
While loops
Use 'while' when the decision to stop depends on a condition checked on each iteration.
For loops
Use 'for' when a range, collection, or another iterable supplies the values.
Break and continue
'break' ends the nearest loop. 'continue' skips the rest of the current iteration.
Use if, elif and else for conditions, while for condition-controlled loops and for name in sequence for iteration. A two-binding loop receives the key or index followed by the value. Break exits the nearest loop, continue begins its next iteration, and pass provides an empty statement. A top-level return supplies the host's execution result. The CLI still reports normal completion with exit status zero. Otherwise the result is the module's exports.