[Tutor] range() in 2.1

Charlie Clark Charlie Clark <charlie@begeistert.org>
Thu, 02 Aug 2001 21:11:54 +0200


>the values 1..9 whereas in all the earlier pythons 
>it would return 0..9
>
>Have the authors got it wrong or did range() change 
>behaviour in v2.1 - I find that hard to believe! 
>OTOH the examples in the article look like a cut n paste 
>from a terminal session at the >>> prompt (including 
>copyright message etc)
If that's the case let me try ;-)

Python 2.1 (#2, Apr 26 2001, 21:54:18)
[GCC 2.9-beos-991026] on beos5
Type "copyright", "credits" or "license" for more information.
>>> for i in range(10): print i,
...
0 1 2 3 4 5 6 7 8 9       
>>> range(10)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

mm, looks pretty the same as ever to me. I would wonder a lot if it had 
changed, that surely break a lot of things!!!

Charlie
-- 
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-463-6199
http://www.begeistert.org