n1 = 255 n2 = 1000
print(hex(n1))
print(hex(n2))
print(format(n1,'x'))
print(format(n2,'x'))
0xff
0x3e8
ff
3e8
Sign in to make a reply
起落
print(hex(n1))
print(hex(n2))
print(format(n1,'x'))
print(format(n2,'x'))
0xff
0x3e8
ff
3e8