Input:
'0x0 0x48 0x65 0x6c 0x6c 0x6f 0x8E 0x21'
Output:
Hello!
Current Solution:
s = []
birary_data = '0x0 0x48 0x65 0x6c 0x6c 0x6f 0x8E 0x21'.replace(' ', '').split('0x')
for c in birary_data:
if len(c) > 1:
s.append(bytes.fromhex(c).decode('utf-8', 'ignore'))
print("".join(s))
Need help with:
Could anyone suggest a more elegant solution, please?