Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 449 Bytes

File metadata and controls

19 lines (12 loc) · 449 Bytes

Lambda Functions

Anonymous functions defined inline with the lambda keyword. See Anonymous function — Wikipedia.

Syntax

lambda <parameters>: <expression>

When to use

Most useful when passing a short function as an argument — e.g. as a sort key — where defining a full named function would be unnecessary overhead.

Run

python lambda_functions.py