range

Tim Evans t.evans at paradise.net.nz
Thu Mar 6 05:04:11 EST 2003


"Hilbert" <hilbert at microsoft.com> writes:

> Hello,
> 
> Why does range(1,4,1) return [1,2,3]?
> It does not make sense at all.
> It should return [1,2,3,4].
> 
> Am I crazy?
> Hilbert
> 
> (also 1/2 should return 0.5, but that's another thread)

It hardly needs its own thread (python 2.2 or above):
>>> from __future__ import division
>>> 1/2
0.5

-- 
Tim Evans




More information about the Python-list mailing list