不用那么复杂吧?可以简化
def count1():
fs = []
for i in range(1, 4):
def f():
return i*i
fs.append(f())
return fs
f1, f2, f3 = count1()
print f1, f2, f3
def count1():
fs = []
for i in range(1, 4):
def f():
return i*i
fs.append(f())
return fs
f1, f2, f3 = count1()
print f1, f2, f3
2019-08-22
举报