3 ms·
Fair enough, the example is a bit exaggerated. You could implement it with comprehensions all(func3(y) for y in (func1(x) for x in zip(a, b)) if func2(y)) I
by lauriat 6y ago
Fair enough, the example is a bit exaggerated.
You could implement it with comprehensions
all(func3(y) for y in (func1(x) for x in zip(a, b)) if func2(y))
It most likely is a bit faster, but I wouldn't say it's more readable.