Computer >> Computer tutorials >  >> Programming >> Python

What is an anonymous function in Python?


In Python, anonymous function is a function that is defined without a name. While normal functions are defined using the def keyword, in Python anonymous functions are defined using the lambda keyword. Hence, anonymous functions are also called lambda functions.

 If we run the given code we get the following output

C:/Users/TutorialsPoint1/~.py
[(13, -3), (4, 1), (1, 2), (9, 10)]