函数作为数据类型

 1 # 1、函数可以作为一种数据类型   function
 2 # 2、函数的返回值可以作为一种数据类型
 3 
 4 def func1():
 5     return "abc"
 6 
 7 a = func1
 8 print(type(a))   # function
 9 print(type(func1))   # function
10 
11 b = func1()
12 print(type(b))  # str
原文地址:https://www.cnblogs.com/BKY88888888/p/11266039.html