Skip to content

Instantly share code, notes, and snippets.

@autocorr
Created May 26, 2014 22:54
Show Gist options
  • Save autocorr/05df1cfd0ea16460d9b1 to your computer and use it in GitHub Desktop.
Save autocorr/05df1cfd0ea16460d9b1 to your computer and use it in GitHub Desktop.
FizzBuzz implementation in python
wl = [(3, 'Fizz'),
(5, 'Buzz'),
(7, 'Qux')]
for i in range(0, 101):
print ''.join([w for n, w in wl if not i % n]) or i
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment