fork download
  1. def func_with_list(arr = []):
  2. arr.append("foo")
  3. print(arr)
  4. return arr
  5.  
  6.  
  7. func_with_list([1,2,3])
  8. func_with_list()
  9. func_with_list([1,2,3])
  10. func_with_list()
  11.  
Success #stdin #stdout 0.07s 14064KB
stdin
Standard input is empty
stdout
[1, 2, 3, 'foo']
['foo']
[1, 2, 3, 'foo']
['foo', 'foo']