prefer-direct-iteration
Iterate a sequence directly when range(len()) only indexes it.
Why
An index that only reads the corresponding sequence item obscures a direct iteration over values.
Fix
Replace range(len(sequence)) and sequence[index] reads with a direct loop over sequence items.
Examples
def run(files): for index in range(len(files)): consume(files[index])def run(files): for item in files: consume(item)