可以作为参数传递给函数: def func(): pass def proxy(fn): fn() proxy(func)
函数的命名规范和变量一样,函数名其实就是变量名:
可以作为列表中的元素进行存储.
def hanshu1(): pass def hanshu2(); pass list = [hanshu1,hanshu2] for el in list: el()