What is lambda functions in Python?

Technology Community › Category: Python › What is lambda functions in Python?
VietMX Staff asked 5 years ago

A lambda function is a small anonymous function. A lambda function can take any number of arguments, but can only have one expression.

Consider:

x = lambda a : a + 10
print(x(5)) # Output: 15