Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def update_dict(key, value, defaults={}):
- defaults[key] = value
- print(defaults)
- update_dict(key='fruit', value='apple')
- update_dict(key='vegetable', value='tomato', defaults = {'tree': 'oak'})
- update_dict(key='car', value='ferrari')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement