Convert string to hex (Python recipe) edit

encode and decode. this functionality already exists with the encodings library (which is built-in):
>>> "hello".encode("hex")
'68656c6c6f'
>>> "68656c6c6f".decode("hex")
'hello'
>>>

0 comments:

Post a Comment

Newer -> <- Older