Guest User

Untitled

a guest
Jun 20th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. def f(arg={}):
  2.     if '1' in arg:
  3.         arg['1'] = 2
  4.     arg['3'] = 4
  5.     return arg
  6.  
  7. >> f()
  8. {'3': 4}
  9. >> res = f()
  10. >> res['4'] = "Still here"
  11. >> print f()
  12. {'3': 4, '4': 'Still here'}
Add Comment
Please, Sign In to add comment