Flip sign once ' = ' is seen
elif ( equation [ j ] == ' = ' ) : NEW_LINE INDENT if ( j > i ) : NEW_LINE INDENT total = ( total + sign * int ( equation [ i : j ] ) ) NEW_LINE DEDENT sign = - 1 NEW_LINE i = j + 1 NEW_LINE DEDENT