Variable name lookup in nested function : Variable Scope : Function PYTHON TUTORIALS


PYTHON TUTORIALS » Function » Variable Scope »

 

Variable name lookup in nested function


def normal():
    def action():
        return spam        
    spam = 'ni'
    return action

act = normal()
print act()



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Function
» Variable Scope