Skip to content

Instantly share code, notes, and snippets.

@notsobad
Created November 20, 2019 09:20
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 notsobad/2229716c4f43b1cbde23a587e62909b4 to your computer and use it in GitHub Desktop.
Save notsobad/2229716c4f43b1cbde23a587e62909b4 to your computer and use it in GitHub Desktop.
for i in range(100):
n = i + 1
out = []
if n % 3 == 0:
out.append('fizz')
if n % 5 == 0:
out.append('buzz')
if not out:
out.append(str(n))
print ','.join(out)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment