Skip to content

Instantly share code, notes, and snippets.

@greut
Last active April 19, 2016 09:01
Show Gist options
  • Save greut/4b32e322e1cff618ea44fa7ce720d6bf to your computer and use it in GitHub Desktop.
Save greut/4b32e322e1cff618ea44fa7ce720d6bf to your computer and use it in GitHub Desktop.
Yet another fizzbuzz
max = 100
f = (("FizzBuzz", range(15, max+1, 15)), ("Buzz", range(5, max+1, 5)), ("Fizz", range(3, max+1, 3)))
for i in range(1, max+1):
for n, r in f:
if i in r:
i = n
break
print(i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment