For example:
for k in range(3): for v in range(k+1): list1.append(v) print(list1)
Gives an output of:
[0]