Last active
April 19, 2016 09:01
-
-
Save greut/4b32e322e1cff618ea44fa7ce720d6bf to your computer and use it in GitHub Desktop.
Yet another fizzbuzz
This file contains hidden or 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
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