1d = {'key':'value'}
2print(d)
3# {'key': 'value'}
4d['mynewkey'] = 'mynewvalue'
5print(d)
6# {'mynewkey': 'mynewvalue', 'key': 'value'}
7
1d = {'a': 1, 'b': 2}
2print(d)
3d['a'] = 100 # existing key, so overwrite
4d['c'] = 3 # new key, so add
5d['d'] = 4
6print(d)
7