Why Use the reduce() Function?
Now that you know the basics of how the
reduce() function works, you’re going to look into some of the interesting ways in which you can use this building block of functional programming. You’ll see how the
reduce() function allows you to group your data set into arbitrary categories.
You’ll also learn about Python’s
defaultdict class, which is defined in the
collections module. Next, you’ll familiarize yourself with some useful helpers in the
itertools module, such as
Comments & Discussion
Become a Member to join the conversation.