Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

Python Continue


continue Statement is a jump statement that is used to skip the present iteration and forces next iteration of loop to take place. It can be used in while as well as for loop statements.

continuestatement1

eg:

  1. a=0
  2. while a<=5:
  3.     a=a+1
  4.     if a%2==0:
  5.         continue
  6.     print a
  7. print “End of Loop”

Output:

  1. >>>
  2. 1
  3. 3
  4. 5
  5. End of Loop
  6. >>>

Flow chart of continue:-

flowchartofcontinue

Comments

comments