5 ms·
My for-real-not-humor implementation: def fizzbuzz(i, n): while i <= n: yield i%15 and (i%5 and (i%3 and i or 'fizz') or 'buzz') or 'fi
by netdog 12y ago
My for-real-not-humor implementation:
def fizzbuzz(i, n):
while i <= n:
yield i%15 and (i%5 and (i%3 and i or 'fizz') or 'buzz') or 'fizzbuzz'
i += 1
for x in fizzbuzz(1, 100):
print x