Learn Functional Programming in Python

Gain insights into functional programming in Python, learn about functions as objects, recursion, closures, and generators, and discover how to confidently apply these concepts to your projects.

Beginner

95 Lessons

5h

Certificate of Completion

Gain insights into functional programming in Python, learn about functions as objects, recursion, closures, and generators, and discover how to confidently apply these concepts to your projects.

AI-POWERED

Explanations

AI-POWERED

Explanations

This course includes

3 Assessments
234 Playgrounds
12 Quizzes

This course includes

3 Assessments
234 Playgrounds
12 Quizzes

Course Overview

The functional programming paradigm can be a powerful tool, especially as it can be integrated seamlessly with procedural and object-oriented code in Python. In this course, you’ll learn what functional programming is, how it’s used, and the features of Python that support it. To start, you’ll learn how functions act as objects, the role of mutability, and how to perform recursion. In the latter half of the course, you’ll focus on closures, iterables & iterators, generators, and more. Throughout the cou...Show More

TAKEAWAY SKILLS

Recursion

Functional Programming

Mutability

Closures

Iterators

Transforming Iterables

Reducing Iterables

Comprehensions

Generators

Partial Application

Currying

Functors

Monads

What You'll Learn

Learn to implement functional programming in Python.

Understand the pros and cons of functional programming in Python.

Master the ways to obtain function objects.

Grasp the concept of mutability and recursion in Python.

Acquire skill of using closures as function factories.

Learn to differentiate between iterators and iterables.

Become competent in creating, reducing, and transforming iterables.

Master list comprehensions and generator comprehensions.

Implement function composition and partial application.

Get familiar with functors, applicatives, and monads.

What You'll Learn

Learn to implement functional programming in Python.

Show more

Course Content

1.

Introduction

Get familiar with functional programming in Python, its characteristics, advantages, and challenges.
2.

Functions as Objects

Discover the logic behind treating functions as first-class objects in Python.
3.

Mutability

Break apart the concepts of mutability in Python, understanding both mutable and immutable objects.
4.

Recursion

Break down complex ideas in recursion, factorials, limits, memoization, and list flattening.

Functional Programming in Python - Exam 1

Assessment

5.

Closures

Deepen your knowledge of closures, combining functions, and using functions versus classes.
6.

Iterators

13 Lessons

Focus on iterators, iterables, lazy evaluation, creating custom iterators, and built-in functions.
7.

Transforming Iterables

9 Lessons

Build on Python functions like enumerate, zip, filter, and map for iterable transformations.
8.

Reducing Iterables

7 Lessons

Step through Python's reducing functions to transform iterables into single outcomes efficiently.

Functional Programming in Python - Exam 2

Assessment

9.

Comprehensions

5 Lessons

Get started with creating lists using comprehensions, conditions, and nested structures in Python.
10.

Generators

7 Lessons

Go hands-on with generators in Python, enhancing iterator creation and memory efficiency.
11.

Partial Application and Currying

10 Lessons

Grasp the fundamentals of closures, partial application, currying, and function composition in Python.
12.

Functors and Monads

6 Lessons

Deepen your knowledge of functors, applicative functors, and monads in functional programming.

Functional Programming in Python - Exam 3

Assessment

13.

Useful Libraries

2 Lessons

Simplify complex topics in Python with Itertools, Functools, PyMonad, and Oslash libraries.
14.

Conclusion

1 Lesson

Build on your functional programming skills with key concepts and continued exploration.

Course Author

Trusted by 1.4 million developers working at companies

Anthony Walker

@_webarchitect_

Emma Bostian 🐞

@EmmaBostian

Evan Dunbar

ML Engineer

Carlos Matias La Borde

Software Developer

Souvik Kundu

Front-end Developer

Vinay Krishnaiah

Software Developer

Eric Downs

Musician/Entrepeneur

Kenan Eyvazov

DevOps Engineer

Anthony Walker

@_webarchitect_

Emma Bostian 🐞

@EmmaBostian

Hands-on Learning Powered by AI

See how Educative uses AI to make your learning more immersive than ever before.

Instant Code Feedback

Evaluate and debug your code with the click of a button. Get real-time feedback on test cases, including time and space complexity of your solutions.

AI-Powered Mock Interviews

Adaptive Learning

Explain with AI

AI Code Mentor