Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 392 Bytes

24.md

File metadata and controls

24 lines (18 loc) · 392 Bytes
@author jackzhenguo
@desc 
@date 2019/2/25

24 操作函数对象

In [31]: def f():
    ...:     print('i\'m f')
    ...:

In [32]: def g():
    ...:     print('i\'m g')
    ...:

In [33]: [f,g][1]()
i'm g

创建函数对象的list,根据想要调用的index,方便统一调用。

[上一个例子](23.md) [下一个例子](25.md)