Did you intend to demonstrate a very common off-by-one error in Python?
Probably should've used xrange as well. In the 2.x series, Python's range function returns an actual list.
I believe in 3.x range has been replaced with xrange.
> I believe in 3.x range has been replaced with xrange.
Correct.
I was assuming Python 3, but yes, you are correct.
It's not right. You should add one to the bound because "range" uses half-open intervals. Also, it only works in Python 3; in Python 2, it creates a list of a 1000000000 integers, so you should use "xrange" instead.
Yep, my bad. Didn't really think before I posted. And yes, I was assuming Python 3, so use xrange on Python 2.