Last active
December 14, 2015 08:09
-
-
Save chirag-v/5055941 to your computer and use it in GitHub Desktop.
How to filter( ) even numbers from a given range ( ) of numbers.
This file contains hidden or 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
def even(x): | |
return x % 2 == 0 | |
list(__builtin__.filter(even, range(10))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment