Elementry question on indeces

Rick laptop51 at 51peg.com.nospam
Sun Mar 5 04:05:24 CET 2000

>From the tutorial, on strings and zero relative indeces,
where word =

I have no problem with this, we are asking for 4th entry:
>>> word[4]

but it seems to me the following is asking for the 0th, 1th and 2th entries
(ordinal 1st ,2nd and 3rd) but all we are getting is the zero-th and one-th.

>>> word[0:2]

What am I missing here?  Makes me feel like I've been taking stupid pills.


Yale beat Harvard

More information about the Python-list mailing list