Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 321 Bytes

24.md

File metadata and controls

22 lines (17 loc) · 321 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,方便统一调用。