This code:
i = 0
list = [ i , i+1 , i+2 ]
print(list)
list.append(i+3)
for x in range(0,3):
i += 1
print(list)
return the following output:
[0, 1, 2]
[0, 1, 2, 3]
[0, 1, 2, 3]
[0, 1, 2, 3]
I also tried this code, but the result was the same:
i = 0
list = [ i , i+1 , i+2 ]
print(list)
list.append(i+3)
for x in range(0,3):
i += x
print(list)
and I wanted that it returned this output
[0,1,2]
[0,1,2,3]
[1,2,3,4]
[2,3,4,5]