10 Apr
2020
10 Apr
'20
11:01 p.m.
On Fri, Apr 10, 2020 at 2:56 PM Serhiy Storchaka
Don't listen to anyone. There is only one obvious way to write this in one line:
count = +(lambda *a: a[0](*a))((lambda q, r, s, i: r(r, q, s, i, next(i, s))), (lambda r, q, s, i, x: x is not s and (x in seek) + q(q, r, s, i)), [], iter(chars))
It is not even use such non-functional paradigm as a for loop.
Awesome! My pathetic first attempt merely yielded something that no Real Programmer would ever use. count = sum(a in seek for a in chars)