Python Continue Statement

Below code demonstrates how to use the Python continue statement.

#Python continue statement
for i in range(2, 11):
  if i == 7: #Will skip 7 and continue
    continue
  print(i)


-------------------------------------------
#Output
2
3
4
5
6
8
9
10

Comments

Popular posts from this blog

How to write to a file in Kotlin

Python Tkinter example