def base10toN(num, n):
num_rep = {<NUM_LIT:10>:'<STR_LIT:a>',<EOL><NUM_LIT:11>:'<STR_LIT:b>',<EOL><NUM_LIT:12>:'<STR_LIT:c>',<EOL><NUM_LIT>:'<STR_LIT:d>',<EOL><NUM_LIT>:'<STR_LIT:e>',<EOL><NUM_LIT:15>:'<STR_LIT:f>',<EOL><NUM_LIT:16>:'<STR_LIT:g>',<EOL><NUM_LIT>:'<STR_LIT:h>',<EOL><NUM_LIT>:'<STR_LIT:i>',<EOL><NUM_LIT>:'<STR_LIT>',<EOL><NUM_LIT:20>:'<STR_LIT:k>',<EOL><NUM_LIT>:'<STR_LIT:l>',<EOL><NUM_LIT>:'<STR_LIT:m>',<EOL><NUM_LIT>:'<STR_LIT:n>',<EOL><NUM_LIT>:'<STR_LIT:o>',<EOL><NUM_LIT>:'<STR_LIT:p>',<EOL><NUM_LIT>:'<STR_LIT:q>',<EOL><NUM_LIT>:'<STR_LIT:r>',<EOL><NUM_LIT>:'<STR_LIT:s>',<EOL><NUM_LIT>:'<STR_LIT:t>',<EOL><NUM_LIT:30>:'<STR_LIT:u>',<EOL><NUM_LIT>:'<STR_LIT:v>',<EOL><NUM_LIT:32>:'<STR_LIT:w>',<EOL><NUM_LIT>:'<STR_LIT:x>',<EOL><NUM_LIT>:'<STR_LIT:y>',<EOL><NUM_LIT>:'<STR_LIT:z>'}<EOL>new_num_string = '<STR_LIT>'<EOL>new_num_arr = array(())<EOL>current = num<EOL>while current != <NUM_LIT:0>:<EOL><INDENT>remainder = current % n<EOL>if <NUM_LIT> > remainder > <NUM_LIT:9>:<EOL><INDENT>remainder_string = num_rep[remainder]<EOL><DEDENT>elif remainder >= <NUM_LIT>:<EOL><INDENT>remainder_string = '<STR_LIT:(>' + str(remainder) + '<STR_LIT:)>'<EOL><DEDENT>else:<EOL><INDENT>remainder_string = str(remainder)<EOL><DEDENT>new_num_string = remainder_string + new_num_string<EOL>new_num_arr = r_[remainder, new_num_arr]<EOL>current = current / n<EOL><DEDENT>print(new_num_arr)<EOL>return new_num_string<EOL>
Change a num to a base-n number.
    Up to base-36 is supported without special notation.