Using the continue statement in a for/in structure. : Continue « Language Basics « Python






Using the continue statement in a for/in structure.

Using the continue statement in a for/in structure.
 


for x in range( 1, 11 ):

   if x == 5:
      continue

   print x,

print "\nUsed continue to skip printing the value 5"



           
         
  








Related examples in the same category

1.Demonstrates the break and continue statements
2.The break and continue statementsThe break and continue statements