List comprehension vs. lambda + filter
It is strange how much beauty varies for different people. I find the list comprehension much clearer than filter+lambda, but use whichever you find easier. There are two things that may slow down your use of filter. The first is the function call overhead: as soon as you use a Python function (whether created by … Read more