3 ms·
This is where I ended up: from itertools import islice, cycle print("\n".join(islice(( f + b if f or b else str(i+1)
by Skunkleton 7y ago
This is where I ended up:
from itertools import islice, cycle
print("\n".join(islice((
f + b if f or b else str(i+1)
for i, (f, b) in enumerate(
zip(cycle(["", "", "Fizz"]), cycle(["", "", "", "", "Buzz"]))
)), 100)))