Completed Exercise 6-8 Pets
This commit is contained in:
parent
19323db65a
commit
027b7fd4d5
17
Chapter_06/6-08_pets.py
Normal file
17
Chapter_06/6-08_pets.py
Normal file
@ -0,0 +1,17 @@
|
||||
# Exercise 6-8 Pets
|
||||
# Learning Objective: Nest dictionaries in a list.
|
||||
|
||||
#pets
|
||||
|
||||
killer = {'name': 'killer', 'kind_of_animal': 'hamster', 'size': 'small', 'owner_name': 'jillian'}
|
||||
spud = {'name': 'soud', 'kind_of_animal': 'turtle', 'size': 'small', 'owner_name': 'robert'}
|
||||
tex = {'name': 'tex', 'kind_of_animal': 'lizard', 'size': 'medium', 'owner_name': 'josh'}
|
||||
bartholomeow = {'name': 'bartholomeow', 'kind_of_animal': 'cat', 'size': 'large', 'owner_name': 'michelle'}
|
||||
goldie = {'name': 'goldie', 'kind_of_animal': 'dog', 'size': 'medium', 'owner_name': 'george'}
|
||||
|
||||
|
||||
pets = [killer, spud, tex, bartholomeow, goldie]
|
||||
|
||||
|
||||
for pet in pets:
|
||||
print(pet)
|
||||
Loading…
x
Reference in New Issue
Block a user