Comment

Comment by sovnwnt

> 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]
parent sovnwnt 11 months ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton