Created
December 29, 2017 02:59
-
-
Save anonymous/3df71c8ab1ab639f512aa06fdd77e68d to your computer and use it in GitHub Desktop.
3と5を使ってはいけないfizzbuzz
This file contains 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 fizz(): | |
while True: | |
yield from ['', '', 'Fizz'] | |
def buzz(): | |
while True: | |
yield from ['', '', '', '', 'Buzz'] | |
for i, f, z in zip(range(1, 101), fizz(), buzz()): | |
if f + z == '': | |
print(i) | |
else: | |
print(f + z) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment