Skip to content

Instantly share code, notes, and snippets.

@pcote
Last active January 1, 2016 19:48
Show Gist options
  • Save pcote/af4828f38992f6d0df78 to your computer and use it in GitHub Desktop.
Save pcote/af4828f38992f6d0df78 to your computer and use it in GitHub Desktop.
def fizzbuzz8(maxnum):
pairs = (lambda mn: "\n".join("{}: {}".format(num,
(lambda n: ("" if n % 3 else "fizz") +
("" if n % 5 else "buzz") )(num))
for num in range(1, mn + 1)))(maxnum)
print(pairs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment