Python Example | Hex Bytes to String

Python Example | Hex Bytes to String

December 30, 2021 notehope 0

This python example code introduces how to convert python hex bytes to string. bytesObj = b’\x68\x65\x6C\x6C\x6F’ string = bytesObj.decode(‘utf-8’) print(string) You will get: hello

Python Example | Bytes to String

Python Example | Bytes to String

December 30, 2021 notehope 0

This python example shows how to convert python byte to string. bytesObj = b’52s3a6′ string = bytesObj.decode(‘utf-8’) print(string) We will get: 52s3a6