6.7
friend_0 = {'first_name':'hao','last_name':'zeng yao','age':22,'city':'He zhe'}
friend_1 = {'first_name':'zhang','last_name':'yu','age':22,'city':'Ji nan'}
friend_2 = {'first_name':'yuan','last_name':'hao','age':21,'city':'Ji nan'}
friends = [friend_0,friend_1,friend_2]
for friend in friends:
print(friend)
6.8
pet_0 = {'type': 'dog','The host name': 'Tom'}
pet_1 = {'type': 'cat','The host name': 'john'}
pet_2 = {'type': 'pig','The host name': 'A'}
pets = [pet_0, pet_1, pet_2]
for pet in pets:
print(pet)
6.9
favorite_places = {
'alice': ['Hang zhou','Bei jing','Qing dao'],
'david': ['Mac
python编程从入门到实践(第二版)第六章习题答案6.7-6.11
最新推荐文章于 2024-05-24 22:49:55 发布