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