Python:
my_list = [1, 2]
for v in range(2):
my_list.insert(-1, my_list[v])
print(my_list)
The result of this is [1, 1, 1, 2], but I can't honestly comprehend why? Why isn't there a 0 then a 1? why isn't it after the 2 considering it is -1 for the placement in the list?
Python:
myList = []
for i in range(5):
myList.insert(-1, i)
print(myList)
The result of this is [1, 2, 3, 4, 0]. Why is the 0 not before the 1?
Thank you in advance for any advice given!