Python- 在模块中存储函数
# making_pizzas.pyimport pizzapizza.make_pizza(16, 'pepperoni')pizza.make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese')>
# making_pizzas.pyimport pizzapizza.make_pizza(16, 'pepperoni')pizza.make_pizza(12, 'mushrooms', 'green peppers', 'extra cheese')>
def make_pizza(*toppings): print(toppings)make_pizza('pepperoni') make_pizza('mushrooms', 'green peppers', 'extra cheese') >>('pep
requested_toppings = ['mushrooms', 'green peppers', 'extra cheese']for requested_topping in requested_toppings: print(f"Adding {re