函数调用打印结果不完全
代码如下:# -*-coding:gb2312 -*-
def build_carinfo(brand,name,**car_info):
profile= {}
profile['brand_name'] = brand
profile['car_name'] = name
for key,value in car_info.items():
profile[key] = value
return profile
car_profile = build_carinfo('audi','a4',car_typy='limousine',drive_type='gas')
print(car_profile)
结果打印为:
{'brand_name': 'audi', 'car_name': 'a4', 'car_typy': 'limousine'}
为什么少了一项?求大神帮助!!