Skip to content

Instantly share code, notes, and snippets.

@KatiGithub
Created October 8, 2018 13:20
Show Gist options
  • Save KatiGithub/16c332f2a24963e55838c8f0c8b068c6 to your computer and use it in GitHub Desktop.
Save KatiGithub/16c332f2a24963e55838c8f0c8b068c6 to your computer and use it in GitHub Desktop.
This gist prints out the number 1 to 6 but skips the numbers 3, 6 using the continue statement in the if loop which is nested in the for loop.
for x in range(0,7):
if x == 3 or x == 6:
continue
print(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment