While Loop In Python
October 23, 2015
/
No Comments
Every programming languages provide different control structures. This can be useful for more complicated execution paths. The while loop in Python is used to iterate over a block of code as long as the test expression (condition) is true.
A while loop repeats a statement or group of statements while a given condition is TRUE. It tests the condition before executing the loop body. In Python, the body of the while loop is determined through indentation. Body starts with indentation and the first unindented line marks the end. Python interprets any non-zero value as True. None and 0 are interpreted as False.



