Using Python Lambda Functions - Real Python
Using Python Lambda Functions
Darren Jones 14 Lessons 1h 5m intermediate best-practices pythonPython 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.
What's Included:
- 14 Lessons
- Video Subtitles and Full Transcripts
- Translated Subtitles in 8 Languages
- 1 Downloadable Resource
- Accompanying Text-Based Tutorial
- Interactive Quiz to Check Your Progress
- 3 Hands-On Coding Exercises
- Q&A With Python Experts: Ask a Question
- Certificate of Completion
Downloadable Resources:
Related Learning Paths:
Start NowUsing Python Lambda Functions
14 Lessons 1h 5m
- 1. Python Lambda Functions: Introduction 00:26
- 2. What Is a Lambda Function? 01:59
- 3. Where Are Lambda Functions Useful? 01:32
- 4. Your First Lambda Functions 03:42
- 5. Exercise: Write Your First Lambdas 09:00
- 6. How to Use Lambda With the .sort() Method 07:28
- 7. Exercise: Sort Email Addresses by Domain 08:00
- 8. How to Use the filter() Function 06:09
- 9. How to utilize the map() Function 05:12
- 10. How to Use the reduce() Function 04:54
- 11. Exercise: Combine Digits Into a Number 08:00
- 12. How to Test Lambda Functions 02:24
- 13. Python Lambda Functions (Quiz) 06:00
- 14. Python Lambda Functions (Summary) 00:37
About Darren Jones
With 20 years as a teacher of music technology, Darren is keen to bring his skills to the Python table.
» More about DarrenEach tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:
Dan
Joanna
Sadie
Tappan
Andre
Jon
Aldren
Related Courses:
Exploring Python's Built-in Functions
Using Functional Programming in Python
cottonbytes
Nice! Well explained! Thanks!
Ariadna
Great course!! Very clear!!
Mallesham Yamulla
Many thanks for the tutorial, and I'm highly recommending this tutorials to the audience who would like brush up their knowledge on writing lambda function.
john09
Very nice. Have seen "lambda" keyword and used it a little, not knowing exactly what's going on. Great explanation.