Hacker News new | ask | show | jobs
by sovnwnt 208 days ago
> No disguised booleans

Do indexes count? If not, there's a simple one liner

    def fizzbuzz(n):
        return [str(n), "fizz", "buzz", "fizzbuzz"][1-min(1, n%3) + (1-min(1,n%5))*2]