Return a function and call it : Function type vars : Buildin Function PYTHON examples


PYTHON examples » Buildin Function » Function type vars »

 

Return a function and call it


Return a function and call it

def f1():
    x = 88
    def f2():
        print x
    return f2

action = f1()            # make, return function
action()                 # call it now: prints 88


           
       



    Related Scripts with Example Source Code in same category :

Leave a Comment / Note


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


PYTHON examples

 Navioo Buildin Function
» Function type vars