Finding first changed character from last of string A
for i in range ( len ( A ) ) : NEW_LINE INDENT if ( A [ i ] == temp [ index ] ) : NEW_LINE INDENT j = i NEW_LINE DEDENT DEDENT A = list ( A ) NEW_LINE