📅  最后修改于: 2022-03-11 14:46:35.206000             🧑  作者: Mango
# Python program using the native method to convert bytes to ASCII string
# take hexadecimal string
hex_str = '0x68 0x65 0x6c 0x6c 0x6f'
# convert hex string to ASCII string
string = ''.join(chr(int(i, 16)) for i in hex_str.split())
# printing ASCII string
print('ASCII String:', string)