fork download
  1. def test(x, y=[]):
  2. y.append(x)
  3. return y
  4. print(test(1))
  5. print(test(2))
  6. print(test(3, []))
  7. print(test(4))
  8.  
Success #stdin #stdout 0.03s 9548KB
stdin
Standard input is empty
stdout
[1]
[1, 2]
[3]
[1, 2, 4]