Key Concepts

Review core concepts you need to learn to master this subject

Functional Programming
Lesson 1 of 1
  1. 1
    Get ready to become a master of functional programming! This content branches off some content you may have run into from our Intermediate Python. We will do a quick review of: * tuples * lambda fu…
  2. 2
    Immutable data types are important to use in functional programming as they offer advantages, such as: * thread-safe data manipulation * preventing programmers from accidentally changing a value …
  3. 3
    Lambda functions are crucial in functional programming as they allow the production of neat and concise functions that require other functions as an argument. You should be familiar with lambda fun…
  4. 4
    In this exercise, we will review the map(), filter(), and reduce(), higher-order functions provided by Python. These functions accept an iterable and a processing function as arguments and return a…
  5. 5
    In this exercise, we will see how we can combine the map() and filter() functions. Conceptually, if you’re working with a collection of items and find yourself saying, “I need to map only values …
  6. 6
    In this exercise, we will explore how to use reduce() and filter() together. Let’s consider the following example. We have a tuple representing the menu items for a fictitious restaurant: The Codec…
  7. 7
    In this exercise, we will be focussing on the benefits of using reduce() and map() together. Consider the example of having a dictionary representing a cost of an item sale called costs which map…
  8. 8
    Now that you’ve learned how to combine any two functions, let’s see how (and why) we can combine all three! A reason for doing this would be when you need to “filter” a collection before you “map” …
  9. 9
    Functional programming is widely applicable in the data science domain as higher-order functions can be used to process data files efficiently. One of the most common formats for a data file is a C…
  10. 10
    In this exercise, we will see how we can process the data that is stored in a CSV file. When working with a file that contains a large amount of data, generating every possible record using tuple(…
  11. 11
    We may find ourselves in situations where we are working with JSON Data. The JSON format is the preferred way to structure data such that it may be transmitted over the internet. An API call usuall…
  12. 12
    Congratulations on completing this module on functional programming in Python. We’ve covered many topics on how to write neat and efficient solutions using functional programming. Let’s briefly rec…

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo