while and for loops this concludes our tour of python procedural statements by presenting the language' two main looping constructs--statements that repeat an action over and over the first of thesethe while statementprovides way to code general loops the secondthe for statementis designed for stepping through the items in sequence or other iterable object and running block of code for each we've seen both of these informally alreadybut we'll fill in additional usage details here while we're at itwe'll also study few less prominent statements used within loopssuch as break and continueand cover some built-ins commonly used with loopssuch as rangezipand map although the while and for statements covered here are the primary syntax provided for coding repeated actionsthere are additional looping operations and concepts in python because of thatthe iteration story is continued in the next where we'll explore the related ideas of python' iteration protocol (used by the for loopand list comprehensions ( close cousin to the for looplater explore even more exotic iteration tools such as generatorsfilterand reduce for nowthoughlet' keep things simple while loops python' while statement is the most general iteration construct in the language in simple termsit repeatedly executes block of (normally indentedstatements as long as test at the top keeps evaluating to true value it is called "loopbecause control keeps looping back to the start of the statement until the test becomes false when the test becomes falsecontrol passes to the statement that follows the while block the net effect is that the loop' body is executed repeatedly while the test at the top is true if the test is false to begin withthe body never runs and the while statement is skipped