DEV Community

Cover image for Python useful list functions: map, filter, find and reduce
Hugo Sandoval
Hugo Sandoval

Posted on

Python useful list functions: map, filter, find and reduce

Hello everyone, I made a small recap of these super useful list functions in Python: map, filter, find, reduce.

Let’s start defining our array.

Defining our array of objects
For example, we gonna use some fruits and their price and quantity.

fruits = [
    {
        "name": "Apple",
        "units": 3,
        "price": 0.25
    },
    {
        "name": "Mango",
        "units": 6,
        "price": 0.35
    },
    {
        "name": "Banana",
        "units": 4,
        "price": 0.15
    },
]
Enter fullscreen mode Exit fullscreen mode

Now I have a developer blog, continue reading this post here: https://hhsm95.dev/blog/python-useful-list-functions-map-filter-find-and-reduce/

Thank you!

Discussion (0)