![]() ![]() |
Conceptual Review (page 41 of 55) |
We use loops to repeat or execute code multiple times. It would be inefficient to copy & paste the same code multiple times. We can loop over the items or the elements in a list, tuple, or dictionary, which we have already seen. We do this type of looping using a finite "for" loop (i.e., for each item in a collection or container object). It is referred to as a finite loop because python knows how many times to execute the loop based on the items in the iterable (collection) object.
