使用一个字典来存储一个熟人的信息,包括名、姓、年龄和居住的城市。该字典应包含键first_name 、last_name 、age 和city 。将存储在该字典中的每项信息都打印出来。
friend = {'first_name': 'hui', 'last_name': 'zhang', 'age': 21, 'city': 'luo yang'}
print('first_name is '+friend['first_name'])
print('last_name is '+friend['last_name'])
print('age is '+str(friend['age']))
print('city is '+friend['city'])

被折叠的 条评论
为什么被折叠?



