Skip to content

Instantly share code, notes, and snippets.

@adammenges
Last active December 11, 2015 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adammenges/4643277 to your computer and use it in GitHub Desktop.
Save adammenges/4643277 to your computer and use it in GitHub Desktop.
def fizzbuzz(n):
for i in xrange(1, n+1): print [i, 'Fizz', 'Buzz', 'FizzBuzz'][(i%3 == 0) + 2 * (i % 5 == 0)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment