不返回函数,直接给f的值,是否也可以呢
def count():
fs = []
for i in range(1, 4):
def f():
return i * i
fs.append(f())
return fs
f1, f2, f3 = count()
print(f1, f2, f3)
def count():
fs = []
for i in range(1, 4):
def f():
return i * i
fs.append(f())
return fs
f1, f2, f3 = count()
print(f1, f2, f3)
2019-07-03
举报