复制前面的程序user_profile.py,在其中调用build_profile() 来创建有关你的简介;调用这个函数时,指定你的名和姓,以及三个描述你的键-值对。
def build_profile(first, last, **user_inf):
user_inf['first_name'] = first
user_inf['last_name'] = last
return user_inf
print(build_profile(
'xiao', 'xiao hui',
hometown='luo yang',
major='automation'
))