lambdaExpert Playground

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

Python Playground
Output
Click "Run" to execute your code

lambda and def compile to the same bytecode. The only differences are: lambda's __name__ is '<lambda>', and lambda can only contain a single expression.

Challenge

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