SHARE
TWEET

Untitled

a guest Oct 21st, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def foo(a, l=[]):
  2.     l.append(a)
  3.     print(l)
  4.  
  5. l = [1, 2]
  6.  
  7. foo(1)
  8. foo(1, l)
  9. foo(1, l)
  10. foo(1)
  11. foo(1)
  12.  
  13. # output ?
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top