Iterating backwards .
for i in range ( len ( count_vector ) - 1 , - 1 , - 1 ) : NEW_LINE INDENT current_count = count_vector [ i ] [ 1 ] NEW_LINE prev_count = count_vector [ i - 1 ] [ 1 ] NEW_LINE DEDENT