Search This Blog

Python: int to hex string


print(hex(255))
Result:

'0xff'

hex(255)[2:]
Result:

'ff'

No comments:

Post a Comment