是否可以从外部传入参数?
def count():
fs = []
for i in range(1, 4):
def f(j):
return j*j
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(j):
return j*j
fs.append(f)
return fs
f1, f2, f3 = count()
print f1(1), f2(2), f3(3)
2019-03-14
举报