returnAdvanced Playground

Exits a function and optionally sends a value back to the caller

Python Playground
Output
Click "Run" to execute your code

Functions are first-class objects, so you can return functions (closures), classes, or any other object from a function.

Challenge

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