If I have this list with 10 elements:
>>> l = [1,2,3,4,5,6,7,8,9,0]
Why will l[10] return an IndexError, but l[-1] returns 0?
Because, index value starts from 0. In your case the last index value is 9, no more index value after 9. when you try print the values beyond the index value limit, it must throws an error