Skip to content

Instantly share code, notes, and snippets.

@haqpl
Created July 1, 2018 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haqpl/122aa96104baf3850fafda85828110ec to your computer and use it in GitHub Desktop.
Save haqpl/122aa96104baf3850fafda85828110ec to your computer and use it in GitHub Desktop.
list comprehension even elements
a = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
b = [c for c in a if c%2 == 0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment