Why use enumerate() instead of range() in your python's loops

enumerate() is faster when you want to repeatedly access the list/iterable items at their index. When you just want a list of indices, it is faster to use len() and range().

The range() function is often useful when iterating over a set of integers: