#闭包函数 def multiplier(factor): def multiplyByFactory(number): return number*factor return multiplyByFactory double= multiplier(2) print(double(5)) print(multiplier(12)(2))
result:
10 24