Using the break statement in a for structure. : For : Statement PYTHON TUTORIALS


PYTHON TUTORIALS » Statement » For »

 

Using the break statement in a for structure.


for x in range111 ):
   if x == 5:
      break
   print x,

print "nBroke out of loop at x =", x



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Statement
» For