Last active
December 2, 2017 12:34
-
-
Save RPDiep/451c795addce47117b4658165c013653 to your computer and use it in GitHub Desktop.
FizzBuzz python oneliner
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
print('\n'.join([('Fizz' if i % 3 == 0 else '') + ('Buzz' if i % 5 == 0 else '') 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
Not to call this a thing of beauty, but it is possible to create a python oneliner for the fizzbuzz problem 😄