求大神一步步解释下返回函数好吗 菜鸟已经有点晕了
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, f3 = count() print f1(), f2(), f3()
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, f3 = count() print f1(), f2(), f3()
2016-12-03
举报