May 2018
Beginner
472 pages
15h 3m
English
This chapter covers
Python provides a complete set of control-flow elements, with loops and conditionals. This chapter examines each element 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 a Boolean expression—that is, one that evaluates to a True or False value. As long as it’s True, the body is executed repeatedly. When the condition ...
Read now
Unlock full access