returnIntermediate Playground

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

Python Playground
Output
Click "Run" to execute your code

Python can return multiple values as a tuple (with implicit packing). You can also return dicts or named tuples for clarity.

Challenge

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