Skip to content

Instantly share code, notes, and snippets.

@rectangletangle
Last active August 29, 2015 14:01
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 rectangletangle/1368fd548694ec8cd4c3 to your computer and use it in GitHub Desktop.
Save rectangletangle/1368fd548694ec8cd4c3 to your computer and use it in GitHub Desktop.
A PERFECTLY NORMAL AND SANE FIZZBUZZ
print('\n'.join((exec('def fizzbuzz():\n\tfor i in range({}):\n\t\t'.format('*' + repr((locals().update({'start': 1, 'stop': 101}), start, stop)[1:])) + '\n\t\t'.join('elif i == {}:\n\t\t\tyield "{}"'.format(i, 'Fizz' * (not i % 3) + 'Buzz' * (not i % 5) or i)[abs(~i) if i == 1 else None:] for i in range(start, stop))), locals()['fizzbuzz'])[1]()))
@an-dev
Copy link

an-dev commented May 14, 2014

why???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment