How can I count down each member in ass until zero. Basically, every member should start with zero.
ass = [[8, 9],[0, 1, 2, 3],[3, 4, 5, 6, 7],[2, 3, 4, 9]]
For example; [8, 9] should be [0,1,2,3,4,5,6,7,8,9]
But [0, 1, 2, 3] now starts from zero, I do not change anything
Thank you
>Solution :
Combining range with remaining slice:
arr = [[8, 9],[0, 1, 2, 3],[3, 4, 5, 6, 7],[2, 3, 4, 9]]
arr = [list(range(0, a[0]+1)) + a[1:] for a in arr]
[[0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
[0, 1, 2, 3],
[0, 1, 2, 3, 4, 5, 6, 7],
[0, 1, 2, 3, 4, 9]]