ต้อง decode bytes ให้เป็น string
1. ใช้ decode() บน bytes object
>> b"abcde".decode("utf-8")
'abcde'
2. ใช้ map(chr, bytes) สำหรับ ASCII
bytes = [112, 52, 52]
print("".join(map(chr, bytes)))
ผลลัพธ์
p44
ต้อง decode bytes ให้เป็น string
>> b"abcde".decode("utf-8")
'abcde'
bytes = [112, 52, 52]
print("".join(map(chr, bytes)))
p44