Skip to content

Instantly share code, notes, and snippets.

@eriky
Created January 4, 2020 11:01
Show Gist options
  • Save eriky/4408d3df7307feecf9edf0ed55ba159c to your computer and use it in GitHub Desktop.
Save eriky/4408d3df7307feecf9edf0ed55ba159c to your computer and use it in GitHub Desktop.
filtered = [i for i in range(20) if i%2==0]
print(filtered)
# [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment