Replace range(len(iterable)) with enumerate

Used enumerate to cache the value of sl[i] as item at each iteration.
Hopefully avoids repeated duplicate array lookups.

Was only safe to replace sl[i] with item in locations were prior
mutation is guaranteed not to happen during each iteration
1 file changed