Python ships a small set of built-in functions designed for working with collections: map, filter, zip, enumerate, sorted, any, and all. They turn loops that span ten lines into one-liners.
You’ll see these everywhere in data and ML code, so the goal of this section is to make them feel as natural as if and for.
What’s in this section
mapandfilter— transform and select itemszipandenumerate— combine and number sequencessorted— sort by anything with akeyfunctionanyandall— ask “any of these true?” or “all of these true?”
By the end, the difference between a beginner and an intermediate Python developer is mostly comfort with these.