Skip to content

Instantly share code, notes, and snippets.

/fizbuzz.py
Created Dec 29, 2017

Embed
What would you like to do?
3と5を使ってはいけないfizzbuzz
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
You can’t perform that action at this time.