##hex转字符串 a = '61626364656667' a_bytes = bytes.fromhex(a) print("hex to string:",a_bytes.decode()) ##字符串转hex b = b'HelloWorld' b_bytes = bytes.hex(b) print("string to hex:",b_bytes)
##hex转字符串 a = '61626364656667' a_bytes = bytes.fromhex(a) print("hex to string:",a_bytes.decode()) ##字符串转hex b = b'HelloWorld' b_bytes = bytes.hex(b) print("string to hex:",b_bytes)