Python学习第十三篇——函数的深层次运用

 def make_pizza(size,*toppings):
print("\nmaking a "+str(size)+" size pizza with following toppings:")
for topping in toppings:
print("-"+topping) make_pizza(12,'apple')
make_pizza(25,"banana","mango","beaf","tomato")
#--------------
def build_profile(first_name,last_name,**user_info):
profile = {}
profile['first'] = first_name
profile['last'] = last_name
for key,value in user_info.items():
profile[key] = value
return profile message = build_profile('albert','einstein',nation='American',filed='physics')
print(message)
上一篇:【Swift学习】Swift编程之旅---继承(十七)


下一篇:MyCat 学习笔记 第九篇.数据分片 之 数值分布