fork download
  1. # your code goes here
  2.  
  3. def a(c = []):
  4. if len(c) !=0:
  5. c.append(c[len(c)-1]+1)
  6. else:
  7. c.append(1)
  8. print(c)
  9.  
  10. for i in range(0, 10):
  11. a()
  12.  
Success #stdin #stdout 0.02s 9984KB
stdin
Standard input is empty
stdout
[1]
[1, 2]
[1, 2, 3]
[1, 2, 3, 4]
[1, 2, 3, 4, 5]
[1, 2, 3, 4, 5, 6]
[1, 2, 3, 4, 5, 6, 7]
[1, 2, 3, 4, 5, 6, 7, 8]
[1, 2, 3, 4, 5, 6, 7, 8, 9]
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]