为什么除去了f3,f()就显示错了
def count():
fs = []
for i in range(1, 4):
def f(j):
def g():
return j*j
return g
r = f(i)
fs.append(r)
return fs
[f1,f2]=count()
print f1(),f2()
def count():
fs = []
for i in range(1, 4):
def f(j):
def g():
return j*j
return g
r = f(i)
fs.append(r)
return fs
[f1,f2]=count()
print f1(),f2()
2019-05-19
举报