Skip to content

Instantly share code, notes, and snippets.

@jmolinski
Last active March 28, 2016 22:25
Show Gist options
  • Save jmolinski/23250450d34e1e85494b to your computer and use it in GitHub Desktop.
Save jmolinski/23250450d34e1e85494b to your computer and use it in GitHub Desktop.
Oneliner - FizzBuzz (Python 3) - 297 bytes
print('\n'.join([repr(x) for x in list(dict(list({x:'fizzbuzz' for x in range(101) if x%15==0}.items())+list({x:'fizz' for x in range(101) if x%3==0 and x%5}.items())+list({x:'buzz' for x in range(101) if x%5==0 and x%3}.items())+list({x:'' for x in range(101) if x%5 and x%3}.items())).items())]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment