Hacker News new | ask | show | jobs
by lazyfunctor 4452 days ago
Mine with some itertools abuse :)

from itertools import cycle , izip

[(f + b or x) for f, b, x in izip(cycle([''] * 2 + ['Fizz']), cycle([''] * 4 + ['Buzz']), range(1, 100))]

Edit: not sure how to post code in comments. e.g. * is lost

1 comments

Nicely done.

> Edit: not sure how to post code in comments. e.g. * is lost

Put a couple of blanks before each line. This displays it in a monospace font, too.