Python Editor

Python | Lesson 2 | While Continue Statement


# Continue stops the current iteration and will continue next iteration
a = 0
while a < 16:
  print(a)
  a += 1
  if(a == 5):
    continue
  print(a)

3 comments:

  1. a = 0
    while a < 1000:
    a = a + 20
    print(a)

    ReplyDelete
  2. countries = ["China", "India", "Russia", "Germany"]
    color = ["Blue", "Yellow", "Black", "Brown"]

    for countries in color:
    print (countries)

    ReplyDelete