Extract the real number
while ( s1 [ i ] . isdigit ( ) ) : NEW_LINE INDENT a = a * 10 + ( int ( s1 [ i ] ) ) NEW_LINE i += 1 NEW_LINE DEDENT if ( s1 [ i ] == ' + ' ) : NEW_LINE INDENT sb = 0 NEW_LINE i += 1 NEW_LINE DEDENT if ( s1 [ i ] == ' - ' ) : NEW_LINE INDENT sb = 1 NEW_LINE i += 1 NEW_LINE DEDENT