a = [[], []] a[1].append(1) print(a)
[[], [1]]
ans = [[]]*5 arr = [4,1,3,2,5] N=5 count = N*1 for i in range(N): if arr[i] == count: print("i = ", i," count = ",count) print(ans) ans[i].append(count) print(ans)
i = 4 count = 5 [[], [], [], [], []] [[5], [5], [5], [5], [5]]