Skip to content

Instantly share code, notes, and snippets.

@typosone
Created July 4, 2014 05:49
Show Gist options
  • Save typosone/ff961195b75be1f339ad to your computer and use it in GitHub Desktop.
Save typosone/ff961195b75be1f339ad to your computer and use it in GitHub Desktop.
適当にFizzBuzz
#!/usr/bin/env python3
# 面倒なので関数化とかしてないよ
end = 1000
print([x if x % 3 != 0 and x % 5 != 0
else 'FizzBuzz' if x % 15 == 0
else 'Buzz' if x % 5 == 0
else 'Fizz' for x in range(1,end)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment