Python:higher-order_function