7 for statement

= sites [ " baidu " , " Google " , " noob " , " taobao " ]
 for Site in sites:
     IF Site == " noob " :
         Print ( " ! novice Tutorial " )
         BREAK    # out of the loop body 
    Print ( " cyclic data : " , Site)
 the else :
     Print ( " no loop data ")

print(" Complete cycle " )

result:

Guess you like

Origin www.cnblogs.com/CPU-Easy/p/12116323.html