December 2009
Beginner to intermediate
360 pages
11h 12m
English
This chapter covers
Python provides a complete set of control-flow elements, with loops and conditionals. This chapter examines each in detail.
You’ve come across the basic while loop several times already. The full while loop looks like this:
while condition:
body
else:
post-code
condition is an expression that evaluates to a true or false value. As long as it’s True, the body will be executed repeatedly. If it evaluates to False, the while loop ...
Read now
Unlock full access