Python OOPs


Python SQLite


Examples


Others


Python Continue Statement


The continue statement used to exits the current iteration of a loop, and jump to the next iteration.

Syntax
continue

Write a Python program to print all leap years from given range using continue statement.

Example
f_year=1990
t_year=2010
print("Leap Years from ",f_year," to ",t_year)
for year in range(f_year, t_year):
    if year % 4 != 0:
        continue
    print(year)
Output
Leap Years from 1990 to 2010
1992
1996
2000
2004
2008