►
Run
a = 31 result = format(a, 'X') print(result)
Output