How to convert hex str to an hex bytearray

时间:2015-06-30 13:36:38

标签: python string hex bytearray

i would convert the following byte content as str using python to an bytearray

'0B C0 C0 C0 C8 FF 43 ED 44 C0 \r\n'

like below

bytearray(b'\x0b\xc0\xc0\xc0\xc8\xffC\xedD\xc0')

how it can be done?

0 个答案:

没有答案