Bill Anderson wrote:
> Jerome Alet wrote:
> > On Fri, 15 Dec 2000, Steve Drees wrote:
> > > somestring[:1999] is the first 2000 characters of somestring.
> > Not to be a poseur but:
> me either ;^)=
> > somestring[:1999] is the first 1999 characters of somestring, because
> > in Python indices begin at 0, e.g.:
> Actually, it is because the number 1999 refers to the the spot
> *inbetween* 1998 and 1999. Basically, in a list of '0,1,2,3',  is
I meant to write: ...before the first...
> first 'comma', and  the second, and so on. Counting that way shows
> that you never include the 1999 (or the three in your example. It isn't
> that indices start at zero, it is due to the counting being done on the
> seperator, not the item in the list.
Zope maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -