return: sending an answer back

Syntax and values

return value
return

return immediately leaves the current function. A bare return, or reaching
the end of a function, returns none. Using return outside a function is a
compile-time semantic error.

Example

# language: en
function absolute(value):
    if value < 0:
        return -value
    return value
say absolute(-3)

Syntax and values · Built-ins · Programming guides