On Fri, 2003-08-29 at 20:58, Pigeon wrote: > On Fri, Aug 29, 2003 at 04:44:33PM -0700, Steve Lamb wrote: > > On Fri, 29 Aug 2003 20:01:23 +0100 > > Pigeon <[EMAIL PROTECTED]> wrote: > > > Oh, that's interesting - the for loop's running from 0 to 9, so it > > > prints "81", not "100". > > > > Yes, range(x) does 0 to x-1. This is for stuff like this (and this is a > > bad example)... > > > > for x in range(10): > > baz[x] = foo[x] + bar[x] > > ...so array indices work like C, then. OK!
Python is written in C (no surprise there!), but what is surprising to some is that so many C-isms are in Python. For example: IF FOO == BAR: PRINT 'YES' Also, many modules are full of methods that are nothing but wrappers around C library calls, and thus have roughly the same parameter lists and calling sequences. -- ----------------------------------------------------------------- Ron Johnson, Jr. [EMAIL PROTECTED] Jefferson, LA USA 4 degrees from Vladimir Putin -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]