Skip to content

Instantly share code, notes, and snippets.

@DavidMetcalfe
Created May 27, 2017 20:58
Show Gist options
  • Save DavidMetcalfe/3d70cf007381e8374c8b827ac9e57940 to your computer and use it in GitHub Desktop.
Save DavidMetcalfe/3d70cf007381e8374c8b827ac9e57940 to your computer and use it in GitHub Desktop.
FizzBuzz One-liner for Python3
print('\n'.join("Fizz" * ( i % 3 == 0) + "Buzz" * ( i % 5 == 0) or str(i) for i in range(1, 101)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment