I never have off by one errors in Python, but have always experienced it in previous languages and their libraries. Guido chose very well.
(The one exception is a function in the random module.)
(The one exception is a function in the random module.)
len(range(100)) == 100
Though - I've written a lot of python code and I never use range. The beauty of python is that all collections are iterable so you seldom need to specify ranges.The one thing I still use randint for is rolling dice. randint(1,6) is the equivalent of a six-sided die, and is that bit more readable as such than the equivalent using randrange.
But for any other purpose, randrange beats randint hands down. Off-by-one errors, be gone!