Last active
May 15, 2016 20:57
-
-
Save MuddyBootsCode/b074319be81d9daaee37f3bb87301762 to your computer and use it in GitHub Desktop.
Even Number List Comprehension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100] | |
evenList = [n for n in a if n%2 == 0] | |
print (evenList) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment