为什么这样就错了?
def count():
fs = []
for i in range(1, 4):
def f(j):
def g(j):
return j*j
return g
r = f(i)
fs.append(r)
return fs
f1, f2, f3 = count()
print f1(), f2(), f3()
报错信息:Traceback (most recent call last):
File "index.py", line 21, in
print f1(), f2(), f3()
TypeError: () takes exactly 1 argument (0 given)