0

If in the first cell I write:

%%timeit
a = [1, 2, 3, 4, 5, 6, 7]
a.append(0)

when printing a in another cell, I don't have [1, 2, 3, 4, 5, 6, 7, 0], I thought I would've have it because after defining a and appending 0 n times, I would get the last a defined then appended with a 0.

Screenshot from VScode (Python 3.11) enter image description here

0 Answers0