def char_from_number(number):
 base = 26
 rval = ''
 if (number == 0):
  rval = 'A'
 while (number != 0):
  remainder = (number % base)
  new_char = chr((ord('A') + remainder))
  rval = (new_char + rval)
  number //= base
 return rval

def char_from_number ( number ) : base = 26 rval = '' if ( number == 0 ) : rval = 'A' while ( number != 0 ) : remainder = ( number % base ) new_char = chr ( ( ord ( 'A' ) + remainder ) ) rval = ( new_char + rval ) number //= base return rval
converts number to string by rendering it in base 26 using capital letters as digits .