Skip to content

Instantly share code, notes, and snippets.

@messa
Forked from ViktorStiskala/gist:d9158f027b294f18cca6
Last active August 29, 2015 14:01
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 messa/47e58593113f52d24604 to your computer and use it in GitHub Desktop.
Save messa/47e58593113f52d24604 to your computer and use it in GitHub Desktop.
is_even = lambda n: n % 2 == 0
even_numbers = filter(is_even, range(10**100))
with open('even_numbers.txt', 'w') as f:
for number in even_numbers:
f.write('{}\n'.format(number))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment