Last active
February 22, 2019 08:27
-
-
Save eprislac/d9a2cc77c2ef98286c027f5e2fe23a74 to your computer and use it in GitHub Desktop.
This file contains 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
from functools import reduce | |
def fizzbuzziness(num): | |
tbl = { 'Fizz': num % 3 == 0, 'Buzz': num % 5 == 0 } | |
trues = { k: v for k, v in tbl.items() if v } | |
return reduce((lambda x, y: x + y), list(trues.keys()), '') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment