If list comprehension is better than filter
, as it performs slighly better and is considered more readable (arguably, in my opinion), why does filter
even exist?
I use it all the time, but if the consensus is that list comprehensions are better, what are the reasons why we have the filter
function?