Pages

Monday, September 1, 2014

Python: int to hex string








print(hex(255))
Result:
'0xff'
hex(255)[2:]
Result:
'ff'



No comments:

Post a Comment