Skip to content

Instantly share code, notes, and snippets.

@pcote
Created March 18, 2013 23:15
Show Gist options
  • Save pcote/5191830 to your computer and use it in GitHub Desktop.
Save pcote/5191830 to your computer and use it in GitHub Desktop.
Inspired by FizzBuzz Enterprise Edition found here: https://github.com/Mikkeren/FizzBuzzEnterpriseEdition This is my version using overengineered Python.
#worlds_worst_fizzbuzz.py
print(type("",(),{"__call__":
lambda self, start, end:
[(n, (lambda x: ("fizz" if x % 3 == 0 else "") + ("buzz" if x % 5 == 0 else ""))(n))
for n in range(start,end+1)]
})()(1,50)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment