Question
In Python, which comparison about Lambda, map, and filter is accurate?
- There is no practical difference in behavior, performance, or maintainability when Lambda, map, and filter is involved.
- A comprehension is often clearer for simple transformations, while map or filter may fit existing callable pipelines or reusable functions.
- The oldest option related to Lambda, map, and filter is always the right production choice regardless of workload or context.
- Differences around Lambda, map, and filter are mostly cosmetic, so correctness and debugging quality do not really change.
Hint
Focus on the behavior or tradeoff, not just the keyword.
Answer and rationale
Correct answer: B. A comprehension is often clearer for simple transformations, while map or filter may fit existing callable pipelines or reusable functions.
A comprehension is often clearer for simple transformations, while map or filter may fit existing callable pipelines or reusable functions. This is the comparison that usually separates memorization from understanding.
Track: Python