fork download
  1. def foo(a=[]):
  2. a.append(1)
  3. print(a)
  4.  
  5. foo()
  6. foo([1])
  7. foo()
Success #stdin #stdout 0.02s 9984KB
stdin
Standard input is empty
stdout
[1]
[1, 1]
[1, 1]