On 21May2013 17:56, Chris Angelico <ros...@gmail.com> wrote: | On Tue, May 21, 2013 at 11:12 AM, Cameron Simpson <c...@zip.com.au> wrote: | > - randrange() is like other python ranges: it does not include the end value. | > So your call picks a number from 0..58, not 0..59. | > Say randrange(0,60). Think "start, length". | | Nitpick: It's not start, length; it's start, stop-before. If the start | is 10 and the second argument is 20, you'll get numbers from 10 to 19. | But your conclusion is still accurate :)
But it's still a useful thing to think when you're trying to reason about ranges unless you're doing something unusual. Cheers, -- Cameron Simpson <c...@zip.com.au> Life IS pain, highness... anyone who tries to tell you different is trying to sell you something. - Wesley, The_Princess_Bride -- http://mail.python.org/mailman/listinfo/python-list