Skip to content

Instantly share code, notes, and snippets.

@tknhs
Created August 25, 2014 23:39
Show Gist options
  • Save tknhs/44278f07ffd0cfc3cb52 to your computer and use it in GitHub Desktop.
Save tknhs/44278f07ffd0cfc3cb52 to your computer and use it in GitHub Desktop.
FizzBuzz
# output: 1 - 100
# don't use "if" and "for"
print "\n".join(map(lambda x: [["FizzBuzz", "Fizz"], ["Buzz", str(x)]][bool(x%3)][bool(x%5)], range(1, 101)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment