Skip to content

Instantly share code, notes, and snippets.

@AyatoKinkori
Created September 18, 2013 09:48
Show Gist options
  • Save AyatoKinkori/6606908 to your computer and use it in GitHub Desktop.
Save AyatoKinkori/6606908 to your computer and use it in GitHub Desktop.
def fizz_check(num):
return "fizz" if num % 3 == 0 else ""
def buzz_check(num):
return "buzz" if num % 5 == 0 else ""
def fizz_buzz(num):
return [(fizz_check(n) + buzz_check(n)) or n for n in range(1, num + 1)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment