Skip to content

Instantly share code, notes, and snippets.

@sborquez
Last active December 9, 2020 17:21
Show Gist options
  • Save sborquez/693ab98a3e8c5a43eb816e8df62ce99b to your computer and use it in GitHub Desktop.
Save sborquez/693ab98a3e8c5a43eb816e8df62ce99b to your computer and use it in GitHub Desktop.
Hole-in-one Python Code for a variety of classic CS problems
# FizzBuzz
print(*[(('','Fizz')[i%3==0] + ('','Buzz')[i%5==0]) if (i%3==0 or i%5==0) else i for i in range(1, 101)], sep="\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment