3 ms·
Agreed, that is a much better direction to go. In this particular case you could combine map with filter instead of hiding the filter inside "action"
by rejschaap 7y ago
Agreed, that is a much better direction to go.
In this particular case you could combine map with filter instead of hiding the filter inside "action"
- doc_gunthrop 7y agoBetter yet just combine map and filter into a list comprehension: def action(thing): ... return [func(x) for x in thing if func2(x)]