# It would have the following syntax dict_names = {'d1' : {'name':'bob', 'place':'lawn', 'animal':'man'}, 'd2' : {'name':'spot', 'place':'bed', 'animal':'dog'}} # You can then look things up like >>> dict_names['d1']['name'] 'bob'
Here is what the above code is Doing:
1. Create a dictionary called dict_names
2. Add a key called ‘d1’ to dict_names
3. Add a key called ‘d2’ to dict_names
4. Add a key called ‘name’ to the dictionary that is the value of ‘d1’
5. Add a key called ‘place’ to the dictionary that is the value of ‘d1’
6. Add a key called ‘animal’ to the dictionary that is the value of ‘d1’
7. Add a key called ‘name’ to the dictionary that is the value of ‘d2’
8. Add a key called ‘place’ to the dictionary that is the value of ‘d2’
9. Add a key called ‘animal’ to the dictionary that is the value of ‘d2’