fork download
  1. list = [1,2,3,4]
  2.  
  3. for x in range(0, 10):
  4. for y in range(len(list)):
  5. if list[y] > 0:
  6. list[y] = list[y] - 1
  7.  
  8. print(list)
Success #stdin #stdout 0.08s 10920KB
stdin
Standard input is empty
stdout
[0, 1, 2, 3]
[0, 0, 1, 2]
[0, 0, 0, 1]
[0, 0, 0, 0]
[0, 0, 0, 0]
[0, 0, 0, 0]
[0, 0, 0, 0]
[0, 0, 0, 0]
[0, 0, 0, 0]
[0, 0, 0, 0]