Python loop

traversal loop for

structure 

The for loop structure in traverses the structure:

    statement block

Traversing structures can be: string, range(), file, list line

 

Infinite loop

for judgment

    statement

cyclic reserved words

break continue

Advanced usage

Loop and else: if there is no break, execute the statement block after the else

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325851810&siteId=291194637