Elementry question on indeces
laptop51 at 51peg.com.nospam
Sun Mar 5 05:46:29 CET 2000
OK, got it....thanks.
I would question why it's done this way, but I guess I should read on.
"Patrick Phalen" <python-list at teleo.net> wrote in message
news:00030419362708.02808 at quadra.teleo.net...
> [Rick, on Sat, 04 Mar 2000]
> :: >From the tutorial, on strings and zero relative indeces,
> :: where word =
> :: 'HelpA'.
> :: I have no problem with this, we are asking for 4th entry:
> :: >>> word
> :: 'A'
> :: but it seems to me the following is asking for the 0th, 1th and 2th
> :: (ordinal 1st ,2nd and 3rd) but all we are getting is the zero-th and
> :: >>> word[0:2]
> :: 'He'
> :: What am I missing here? Makes me feel like I've been taking stupid
> Read a page or two further, in the paragraph that begins, "The best way
> to remember how slices work ..."
More information about the Python-list