I want to have a sub-list inside another which return the number of the index of the bigger list summed with the index of the little one.
Anyone with a explanation and the solution ?
def function():
liste1 = [0] * 10
liste2 = liste1 * 10
i = 0
while i < 10:
j = 0
while j < 10:
liste1[j] = i
j += 1
liste2[i] = liste1
i += 1
print(liste2)
function()
First, I tried this code but it return [[9,9,9,9,9,9,9,9,9,9],[9,9,9...