lambdaEasy Playground

Creates a small anonymous (unnamed) function in a single expression

Python Playground
Output
Click "Run" to execute your code

lambda creates a function in one expression. It is most useful as a key function for sorted(), map(), filter(), etc.

Challenge

Try modifying the code above to explore different behaviors. Can you extend the example to handle a new use case?