4 ms·
Would that really work? You can chain those functions because they return the same type. For example, filtering a list returns a subset of the list. Any/all re
by KMnO4 3y ago
Would that really work? You can chain those functions because they return the same type. For example, filtering a list returns a subset of the list.
Any/all return a Boolean, so the chain would stop there.
I also personally think
any(x % 5 in range(y))
Is more clear than
range(y).any(lambda x: x % 5)