<[EMAIL PROTECTED]> wrote

> When I  use the function random.randrange(x,y) I never get the upper 
> limit y
> in the list.  I've tried the range 1,3 and never get 3.  If I choose 
> 1,4 I
> get 3 but never 4.  Is the upperlimit actually <y instead of <=y?

The documentation says it returns a value in the *range* min,max.

A range in Python returns the values min....max-1:

>>> print range(1,3)
[1,2]

HTH,

Alan G. 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to