Lesson 21Using Lambdas

In this lesson, we will learn ways to analyze data to create meaningful business reports based on that data.

Rather than creating a named function, it is sometimes useful to create a short function and embed it as part of a larger function. Lambda functions allow us to do this. A lambda function is a small anonymous function that allows us to create expressions within other functions.

Because iteration is a fundamental task in Python, there are several iteration functions that automatically move through a series of values in a collection, stopping only when the last value in the collection has been processed. There are a few key terms you should be aware of as you work through this lesson:

  • Anonymous function: A function definition that is not bound to an identifier.
  • Lambda function: An anonymous function that can take several arguments but can have only one expression.
  • map(): The map() function returns a map object after ...

Get Job Ready Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.