So far in this module you have written functions with def, given them names, and called them by those names. Python also lets you create small, unnamed functions on the fly using the lambda keyword. A lambda is limited to a single expression, and its value is the result of that expression, which makes it useful whenever a function is needed only briefly — most often as an argument passed to another function.
That pattern of passing functions as arguments is the heart of functional programming in Python. The built-ins map() and filter() each take a function plus an iterable: map() applies the function to every item and produces the transformed results, while filter() keeps only the items for which the function returns a truthy value. Combining them lets you transform and select in one pipeline. Because these tools return lazy iterators rather than lists, you will usually wrap them in list() or loop over them to see the results.
The practical question for this course is not whether you can write map() and filter(), but when you should. Comprehensions often express the same logic more readably, and a named def function is clearer than a complicated lambda. As you watch, pay attention to the syntax rules (what a lambda can and cannot contain), to how each video converts the result of map() or filter() into a visible list, and especially to any guidance on readability — that judgment is what you will be assessed on.
A focused introduction to lambda (anonymous) functions in Python, covering the lambda syntax, how arguments and the single return expression work, and how a lambda compares to an equivalent function defined with def. As part of a day-by-day beginner tutorial series, it is likely to walk through small live-coded examples you can retype yourself.
It isolates the Lambda Functions subtopic cleanly before map() and filter() are introduced, and CodeWithHarry's step-by-step style makes the compact syntax easy to follow for students new to anonymous functions.
The follow-up lesson in the same series, demonstrating map(), filter(), and reduce() and how each one takes a function — commonly a lambda — together with an iterable. Expect worked examples showing transformation with map(), selection with filter(), and the need to convert results to a list to display them; reduce() goes slightly beyond this topic but reinforces the same pattern.
It directly covers The map() Function, The filter() Function, and Combining map and filter, and because it continues straight from the lambda video it shows lambdas in their most common real setting.
A short, tightly scoped explanation of how Python's built-in map and filter functions work, including their lazy iterator behavior, and a discussion of whether to reach for them or for a list comprehension instead. Python Morsels videos are deliberately brief and concept-focused rather than long walkthroughs.
This is the clearest fit for the Choosing Between Comprehensions and Functional Tools subtopic, and Python Morsels is a well-regarded source for precise, idiomatic Python guidance on exactly this kind of style decision.
Together these videos target MO5 most directly: the first builds fluency with lambda syntax, the second shows map() and filter() in action (alone and combined), and the third supplies the comparison with comprehensions that lets you argue for one approach over another on readability grounds. They also reinforce MO1 and MO4 by contrasting throwaway lambdas with reusable def functions and by placing functional pipelines side by side with the comprehensions you practiced earlier in the module. Watch them in the listed order, then try rewriting a few of your own comprehensions as map()/filter() pipelines — and back again — to test which version you find easier to read.
These videos were chosen from YouTube on October 2, 2026. Each has captions; the player turns them on. Videos on YouTube can be changed or removed — if one no longer plays, tell your instructor. If a player does not appear, use its Watch on YouTube link.