so I have a list x = [1,2,3]
when I run print(x[0:100])
it still prints out 1,2,3 I would expect an index out of range error.
so I have a list x = [1,2,3]
when I run print(x[0:100])
it still prints out 1,2,3 I would expect an index out of range error.
It is just returning every element in the list up to 100. It doesn't require that there are 100 elements in the list. If you did x[100] it would error