This article begins with the loop statement, which, like other programming languages, has a while loop and a for loop in Python, which describes the while loop.
Grammar:
While condition expression is true:
Do some things
There are many such loops in real life, and here's an example of a less-than-good approach. For example, I need to increase the number of clicks on an article. We know that the domestic developers, in the article information, reading the number of this piece, do a column, not according to the user's IP address to judge, but according to refresh the current article page, or the current article URL was requested an HTTP, automatically read the number plus 1. If you want to test an informational project, to increase the number of readings on an article, you can write a while loop, and then call selenium inside the Refreash method, until 1000 times the number of stops, hehe. How much reading count you want to read.
Here's an example of a simple, print 10 integers, i.e. 1 to 9
# here
's a while loop # printing the natural number within 10
condition = 1 while
condition < print
(condition)
condition + = 1< c5/># equivalent to condition = condition + 1
Circular statements, to note that the condition of the judgment, otherwise prone to death cycle, if a dead loop, in the Python shell hold down the keyboard Ctrl + C, stop.