def int_to_string(number, alphabet, padding=None):
output = "<STR_LIT>"<EOL>alpha_len = len(alphabet)<EOL>while number:<EOL><INDENT>number, digit = divmod(number, alpha_len)<EOL>output += alphabet[digit]<EOL><DEDENT>if padding:<EOL><INDENT>remainder = max(padding - len(output), <NUM_LIT:0>)<EOL>output = output + alphabet[<NUM_LIT:0>] * remainder<EOL><DEDENT>return output[::-<NUM_LIT:1>]<EOL>
Convert a number to a string, using the given alphabet.
The output has the most significant digit first.