Python‎ > ‎Control Flow‎ > ‎

continue

http://www.adilwaseem.com/

Definition
The continue statement allow the python keep running the code unless condition attached to the execution has become false.

Syntax
Statements
continue

Parameters
N/A

Example
while condition:.....continue
While loop return with the value from 14 to 1.
 x = 15
while x > 0:              
   x = x -1
   if x == 10:
      continue
   print("x value is equal :", x)

>>> 
x value is equal : 14
x value is equal : 13
x value is equal : 12
x value is equal : 11
x value is equal : 9
x value is equal : 8
x value is equal : 7
x value is equal : 6
x value is equal : 5
x value is equal : 4
x value is equal : 3
x value is equal : 2
x value is equal : 1
x value is equal : 0
>>> 

Comments