range(upto) creates a new list of integers beginning at 0 and ending at upto-1. Note that using ranges in order to build loops over a range of integers is not very fast. Use a construction with while instead, if speed matters.
range(from, upto) creates a new list of integers beginning at from and ending at upto-1. Then length of the list is thus upto - from
range(5) == [ 0, 1, 2, 3, 4]
range(5,10) == [ 5, 6, 7, 8, 9 ]
