Home
Python
2D
Application
Buildin Function
Class
Data Structure
Data Type
Database
Development
Dictionary
Event
Exception
File
Function
GUI Pmw
GUI Tk
Language Basics
List
Math
Network
String
System
Thread
Tuple
Utility
XML
Inner function definition : Function Inner « Function « Python
Python
Function
Function Inner
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
2.
Use lambda to define inner function
3.
Nested function: 3 levels