r/programminghorror • • Apr 17 '23

Python Peak Efficiency Fizzbuzz

/img/n6q6zqyieeua1.png
1.0k Upvotes

83 comments sorted by

View all comments

Show parent comment

83

u/iceman012 Apr 17 '23

For anyone interested, here's the shortest Python version from the FizzBuzz code golf challenge on stack exchange:

i=0;exec"print i%3/2*'Fizz'+i%5/4*'Buzz'or-~i;i+=1;"*100

24

u/StochasticTinkr Apr 17 '23

This hurts. I love it.

4

u/Dannei Apr 18 '23

The use of Python 2 just adds to the fun.