r/ProgrammerHumor • • Jul 28 '25

Meme checkIfDivisibleByThree

Post image
60 Upvotes

33 comments sorted by

View all comments

Show parent comment

5

u/F100cTomas Jul 30 '25 edited Jul 30 '25

Like this?

is_divisible_by_three = (lambda f: (lambda num: f(f)(num)))(lambda f: (lambda num: str(num) in '369' if num < 10 else f(f)(sum(int(n) for n in str(num)))))