def Int2AP(num):
 val = ''
 AP = 'ABCDEFGHIJKLMNOP'
 num = int(abs(num))
 while num:
  (num, mod) = divmod(num, 16)
  val = (AP[mod] + val)
 return val

def Int2AP ( num ) : val = '' AP = 'ABCDEFGHIJKLMNOP' num = int ( abs ( num ) ) while num : ( num , mod ) = divmod ( num , 16 ) val = ( AP [ mod ] + val ) return val
convert integer to a-p string representation .