好蠢,花了半天才理清楚
def count(): fs = [] for i in range(1, 4): def f(i): def g(): return i * i return g 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): def g(): return i * i return g fs.append(f(i)) return fs f1, f2, f3 = count() print f1(), f2(), f3()
2019-09-26
举报