python-basic

⌘K
  1. Home
  2. Docs
  3. python-basic
  4. continue

continue

for i in range(1, 11): 
  
    # If i is equals to 6, 
    # continue to next iteration 
    # without printing 
    if i == 6: 
        continue
    else: 
        # otherwise print the value 
        # of i 
        print(i, end = " ")

Output

1 2 3 4 5 7 8 9 10 

How can we help?