Python "why" questions
saeed.gnu
saeed.gnu at gmail.com
Mon Aug 9 09:00:03 EDT 2010
> > 1) Why do Python lists start with element [0], instead of element
> > [1]? "Common sense" would seem to suggest that lists should start
> > with [1].
Because Zero is the neutral element of addition operation. And indexes
(and all adresses in computing) involve with addition much more than
multiplication! That's too clear i think and that's silly to use One
as first index of arrays/lists in a programming language!
More information about the Python-list
mailing list