If the digit exceeds 9 , add the cumulative carry to previous digit .
size = len ( result ) NEW_LINE for i in range ( size - 1 , 0 , - 1 ) : NEW_LINE INDENT if result [ i ] >= 10 : NEW_LINE INDENT result [ i - 1 ] += result [ i ] // 10 NEW_LINE result [ i ] = result [ i ] % 10 NEW_LINE DEDENT DEDENT i = 0 NEW_LINE while i < size and result [ i ] == 0 : NEW_LINE INDENT i += 1 NEW_LINE DEDENT