M&C10: Does every language allow negative indices for lists and strings?

No.  Python and a few other languages (e.g., C++, Ruby, Snobol, Perl) allow negative indices.  A list index of -k mean the k-th item from the end of the list. Hence, L[-1] refers to the last item in list L. Students should think of negative indexing as Indexing from the right end.

string B i l l   G a t e s
index 0 1 2 3 4 5 6 7 8 9
negative Index -10 -9 -8 -7 -6 -5 -4 -3 -2 -1

Note that name[10] and name [-11] result in an IndexError.

Negative indices can be confusing at first. When used correctly they can simplify a program and its logic. Students should think of negative indexing as Indexing from the right end. Languages that do not support negative indexing include Java and C.