fork download
list = [1,2,3,4]

for x in range(0, 10):
    for y in range(len(list)):
        if list[y] > 0:
            list[y] = list[y] - 1
            
    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]