Mastodon FeedMar 19, 2023, 1:41 PM Reblogged by cstanhope@social.coop ("Your friendly 'net denizen"): retr0id@retr0.id ("David Buchanan") wrote: Attachments: A screenshot of "fizzbuzz.py": fizzbuzz = lambda x: [ div3 := x % 3 == 0, div5 := x % 5 == 0, result := "", div3 and [ result := result + "fizz" ], div5 and [ result := result + "buzz" ], result or [ result := str(x) ], result, ][-1] for i in range(1, 101): print(fizzbuzz(i)) (remote)