[PYTHON] In-function function

inner_func.py


def outer(a, b):
    #Functions that can be used only within the function
    def inner(c, d):
        return c+d
    r=inner(a,b)
    print(r)

outer(2,3)

output:

5

Recommended Posts

In-function function
In-function function
python function ①
[Python] function
Recursive function
python function ②
Function review
python3x: lambda function
python enumerate function
[Python] Generator function
Python> function> Inner function
Python function decorator