Last active
August 29, 2015 14:05
-
-
Save dnase/cecf65725f9946a3035c to your computer and use it in GitHub Desktop.
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
| def fbgen(n): | |
| for i in n: | |
| if i % 15 == 0: yield 'Fizzbuzz' | |
| elif i % 3 == 0: yield 'Fizz' | |
| elif i % 5 == 0: yield 'Buzz' | |
| else: yield i | |
| if __name__ == '__main__': | |
| for fb in fbgen(range(1,100)): | |
| print fb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment