Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python nested functions get variables from function scope

def a():
    val = True
    def b():
        nonlocal val
        val = False
 
PREVIOUS NEXT
Tagged: #python #nested #functions #variables #function #scope
ADD COMMENT
Topic
Name
9+9 =