Last active
August 29, 2015 14:21
-
-
Save maurobaraldi/6716e82ca546d474119a to your computer and use it in GitHub Desktop.
Even and Odd in a dict - Coding Golf
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
(lambda n: dict(zip(['impar', 'par'], [filter(lambda x: x != False, map(lambda x: x if x % 2 else False, range(n))), filter(lambda x: x != False, map(lambda x: x if not x % 2 else False, range(n)))])))(10) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment