Range is a form of iterable to which we give bounds, step and direction. If we give it another iterable, how are we to expect it to behave?
>>> for i in range([2, 4, 6, 8]):
Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
for i in range([2, 4, 6, 8]):
TypeError: range() integer end argument expected, got list.
range to construct an iterable with the same number of elements, but in sequence, as the iterable we wish to iterate, we give it the length of the iterable.
for i in range(len(old_list)):