top | item 7562054

(no title)

lazyfunctor | 12 years 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

discuss

order

ggchappell|12 years ago

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.