理解有点困难,为什么不能直接这样算呢?
def count(): fs = [] for i in range(1, 4): def f(i): return i*i fs.append(f(i)) return fs f1, f2, f3 = count() print f1, f2,f3
def count(): fs = [] for i in range(1, 4): def f(i): return i*i fs.append(f(i)) return fs f1, f2, f3 = count() print f1, f2,f3
2017-02-18
举报