Inner function definition : Function Inner : Function : Python examples (example source code) Organized by topic

C++
PHP
Python


Python  »  Function   » [  Function Inner  ]  Screenshots 
 



Inner function definition



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

f1()                  # prints 88




           
       
Related examples in the same category
1.  Define and call a function inside another function Define and call a function inside another function
2.  Use lambda to define inner function Use lambda to define inner function
3.  Nested function: 3 levels Nested function: 3 levels
























Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.