As I learned, in python index -1 is the last number. for instant in:
values = [1, 2 , 3, 4, 5, 6, 7, 8, 9, 10]
print(value[-1])
returns 10 in output.
Now, if I want to insert a number in the last position with insert method, I do:
value.insert(-1,11)
and I expect to have:
[1, 2,3, 4, 5, 6, 7, 8, 9, 10, 11]
but, this is what I get in output:
[1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10]
value
->values