News for hackers. Stuff that matters.
Re:Unpythonic Python by cynwoody on Wednesday April 09, 2014 @04:16PM (#7562043)
Very nice.

If you make the generator always return a string, then you can make it print, thus:

    print '\n'.join((not x % 3) * 'Fizz' + (not x % 5) * 'Buzz' or str(x) for x in range(1, 101))

There are no comments on this comment yet.