Functional programming is a programming paradigm in which the primary method of computation is the evaluation of pure functions. Even though Python isn’t primarily a functional language, you can still write Python following functional programming principles.
To do this, it’s a good idea to be familiar with lambda, map(), filter(), and reduce(). They can help you write concise, high-level, parallelizable code. You may also see these functions used in code that others have written, so it’s good to understand how they work.
In this video course, you learned:
- What functional programming is
- How functions in Python are first-class citizens, and how that makes them suitable for functional programming
- How to define a simple anonymous function with
lambda - How to implement functional code with
map(),filter(), andreduce()
Resources linked in this lesson:
