Skip to content

Instantly share code, notes, and snippets.

@xsaamiir
Created October 14, 2017 15:04
Show Gist options
  • Save xsaamiir/82533bc32ed6c61aadcb3d4935ae6879 to your computer and use it in GitHub Desktop.
Save xsaamiir/82533bc32ed6c61aadcb3d4935ae6879 to your computer and use it in GitHub Desktop.
a = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
even_elements = [i for i in a if i%2 == 0]
print(even_elements)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment