break from for loop : For : Statement PYTHON TUTORIALS


PYTHON TUTORIALS » Statement » For »

 

break from for loop


from math import sqrt 

for n in range(9981, -1)
    root = sqrt(n
    if root == int(root):
       print n 
       break 
    else
       print "Didn't find it!"



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Statement
» For