这个居然也可以,就是理解
def count():
fs = []
for i in range(1, 4):
def f(i):
return i*i
fs.append(f)
return fs
f1, f2, f3 = count()
print (f1(1), f2(2), f3(3))
def count():
fs = []
for i in range(1, 4):
def f(i):
return i*i
fs.append(f)
return fs
f1, f2, f3 = count()
print (f1(1), f2(2), f3(3))
2016-08-23
举报