不理解为什么输出是9,9,9呀?
def count(): fs = [] for i in range(1, 4): def g(): a=i*i return a fs.append(g) return fs f1, f2, f3 = count() print(f1(), f2(), f3())
请大神帮忙解释一下
def count(): fs = [] for i in range(1, 4): def g(): a=i*i return a fs.append(g) return fs f1, f2, f3 = count() print(f1(), f2(), f3())
请大神帮忙解释一下
2020-03-02
举报