Python Lambda Functions: Introduction
Python and other languages like Java, C#, and even C++ have had lambda functions added to their syntax, whereas languages like LISP or the ML family of languages, Haskell, OCaml, and F#, use lambdas as a core concept. Python lambdas are little, anonymous functions, subject to a more restrictive but more concise syntax than regular Python functions.
By the end of this course, you’ll know:
- How Python lambdas came to be
- How lambdas compare with regular function objects
- How to write lambda functions
- Which functions in the Python standard library leverage lambdas
- When to use or avoid Python lambda functions
This course is mainly for intermediate to experienced Python programmers, but it is accessible to any curious minds with interest in programming. All the examples included in this tutorial have been tested with Python 3.7.
Take the Quiz: Test your knowledge with our interactive “Python Lambda Functions” quiz. You’ll receive a score upon completion to help you track your learning progress:
Interactive Quiz
Python Lambda FunctionsPython lambdas are little, anonymous functions, subject to a more restrictive but more concise syntax than regular Python functions. Test your understanding on how you can use them better!
00:02
Hello, and welcome to this Real Python course where you’re going to learn how to use lambda functions. You’re going to find out what a lambda function is, where lambda functions are useful, create some first lambda functions of your own; see lambda functions in action with .sort()
, filter()
, map()
, and reduce()
; and learn how to test lambda functions.
Darren Jones RP Team on Aug. 18, 2020
@kiran - I’ll get them uploaded as part of the course ASAP.
kiran on Aug. 19, 2020
@Darren Jones Thank you so much.
Become a Member to join the conversation.
kiran on Aug. 16, 2020
@Darren Jones can you drop your slide here…?