One frequently finds expressions of this type in python questions on SO. Either for just accessing all items of the iterable
for i in range(len(a)): prin
If you have to iterate over the first len(a) items of an object b (that is larger than a), you should probably use range(len(a)):
len(a)
b
a
range(len(a))
for i in range(len(a)): do_something_with(b[i])