python for loop

Lie Lie.1296 at gmail.com
Thu Apr 2 02:27:04 EDT 2009


On Apr 2, 4:05 pm, Aaron Brady <castiro... at gmail.com> wrote:
> On Apr 1, 11:58 pm, Lie <Lie.1... at gmail.com> wrote:
>
> > On Apr 1, 7:06 pm, Steven D'Aprano
>
> > <ste... at REMOVE.THIS.cybersource.com.au> wrote:
> > > There is a major clash between the names of ordinals in human languages
> > > and zero-based counting. In human languages, the Nth-ordinal item comes
> > > in position N. You can keep that useful convention with zero-based
> > > counting by inventing the ugly word "zeroth", but that just leads to
> > > bizarro-talk like "the zeroeth item comes first, the first item comes
> > > second, and so on".
>
> > No, there won't be any bizarro-talk. There is no argument: the zeroeth
> > item comes zeroeth, the first item comes first, and so on. The index
> > for the very zeroeth thing in a list is 0, so to get the zeroeth item
> > you use s[0]. While to get the first item you use s[1]. It's very
> > intuitive, isn't it?
>
> Robot 1: I won zeroeth place at the contest, honey!
> Robot 2: Congratulations!  I knew you could do it.

That should be Robot 0 and Robot 1.



More information about the Python-list mailing list