1my_dict={'Dave' : '001' , 'Ava': '002' , 'Joe': '003'}
2print(my_dict.keys())
3print(my_dict.values())
4print(my_dict.get('Dave'))
1# In python they are called dictionarys
2dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'}
3
4name = dict["Name"] # Zara
1>>> from collections import ChainMap
2>>> dict1 = {'one': 1, 'two': 2}
3>>> dict2 = {'three': 3, 'four': 4}
4>>> chain = ChainMap(dict1, dict2)
5
6>>> chain
7ChainMap({'one': 1, 'two': 2}, {'three': 3, 'four': 4})
8
9# ChainMap searches each collection in the chain
10# from left to right until it finds the key (or fails):
11>>> chain['three']
123
13>>> chain['one']
141
15>>> chain['missing']
16KeyError: 'missing'
17