View difference between Paste ID: BQS5tUCq and wWBrepfQ
SHOW: | | - or go back to the newest paste.
1
def update_dict(key, value, defaults={}):
2
    defaults[key] = value
3
    print(defaults)
4
    
5
    
6
update_dict(key='fruit', value='apple')
7
update_dict(key='vegetable', value='tomato', defaults = {'tree': 'oak'})
8
update_dict(key='car', value='ferrari')
9