Created
November 1, 2011 21:35
-
-
Save dbspringer/1331992 to your computer and use it in GitHub Desktop.
FizzBuzz one liner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FizzBuzz in one line (minus this comment) | |
print '\n'.join(['%d %s%s' % (i, 'Fizz'*(i%3==0), 'Buzz'*(i%5==0)) for i in xrange(101)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment