Last active
June 17, 2017 01:03
-
-
Save takei-shg/67361098c5abc9b1c22c0ed42b78f408 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 __future__ import print_function | |
def fb(n): | |
if n % 3 == 0 and n % 5 == 0: | |
return 'FizzBuzz' | |
elif n % 3 == 0: | |
return 'Fizz' | |
elif n % 5 == 0: | |
return 'Buzz' | |
else: | |
return '' | |
f = lambda x: print(x, fb(x)) | |
[f(x) for x in range(1,21)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment