Skip to content

Instantly share code, notes, and snippets.

@chirag-v
Last active December 14, 2015 08:09
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 chirag-v/5055941 to your computer and use it in GitHub Desktop.
Save chirag-v/5055941 to your computer and use it in GitHub Desktop.
How to filter( ) even numbers from a given range ( ) of numbers.
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