I keep reading things that sound like comprehensions replace lambdas. As one example, towardsdatascience.com states "[List comprehension] is also a substitute for the lambda function as well as the functions map(), filter() and reduce(). Some people find it a more pythonic way of writing functions and find it easier to understand." Now, I understand that they work for sets, dictionaries, and generators as well. Speed aside, can comprehensions replace any and all abilities that lamdas have? Or only a small percentage?
... View more