Python by Swaroop C H - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

The while statement

The while statement allows you to repeatedly execute a block of statements as long as a condition is true. Awhile statement is an example of what is called a looping statement. Awhile statement can have an optionalelse clause.