<s> __author__ = "<STR_LIT>" <EOL> def conv_int2str ( int1 ) : <EOL> '''<STR_LIT>''' <EOL> aux_dict = { key : value for key in range ( <NUM_LIT:10> ) for value in '<STR_LIT>' [ key ] } <EOL> if int1 == <NUM_LIT:0> : <EOL> return '<STR_LIT:0>' <EOL> elif int1 < <NUM_LIT:0> : <EOL> sign = '<STR_LIT:->' <EOL> int1 = int1 * ( - <NUM_LIT:1> ) <EOL> else : <EOL> sign = '<STR_LIT>' <EOL> aux_ls = [ ] <EOL> while int1 > <NUM_LIT:0> : <EOL> c = int1 % <NUM_LIT:10> <EOL> int1 = int1 // <NUM_LIT:10> <EOL> cadd = aux_dict [ c ] <EOL> aux_ls . append ( cadd ) <EOL> aux_ls . reverse ( ) <EOL> return sign + '<STR_LIT>' . join ( aux_ls ) <EOL> def conv_str2int ( str1 ) : <EOL> '''<STR_LIT>''' <EOL> if not str1 : <EOL> return None <EOL> aux_dict = { key : value for value in range ( <NUM_LIT:10> ) for key in '<STR_LIT>' [ value ] } <EOL> if str1 [ <NUM_LIT:0> ] == '<STR_LIT:->' : <EOL> sign = - <NUM_LIT:1> <EOL> str1 = str1 [ <NUM_LIT:1> : ] <EOL> else : <EOL> sign = <NUM_LIT:1> <EOL> dec , result = <NUM_LIT:1> , <NUM_LIT:0> <EOL> for i in range ( len ( str1 ) - <NUM_LIT:1> , - <NUM_LIT:1> , - <NUM_LIT:1> ) : <EOL> aux = str1 [ i ] <EOL> if aux == '<STR_LIT:e>' : <EOL> exp_num = conv_str2int ( str1 [ i + <NUM_LIT:1> : ] ) <EOL> number = conv_str2int ( str1 [ : i ] ) <EOL> result = number * <NUM_LIT:10> ** exp_num <EOL> break <EOL> result += aux_dict [ aux ] * dec <EOL> dec *= <NUM_LIT:10> <EOL> return result * sign <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> import doctest <EOL> doctest . testmod ( ) </s>
