def apply_twice(func,arg): return func(func(arg)) def add_five(x): return x+5 print (apply_twice(add_five,10))
我得到的输出是20.
这个实际上让我很困惑,比如它是如何工作的.任何人都可以通过分解来解释我的工作方式
python python-2.7 python-3.x
python ×1
python-2.7 ×1
python-3.x ×1