字节转字符串:
st = str(data, encoding = "utf8")
print(st)
print(type(str)) # <class 'str'>
字符串转字节:
by = bytes(st, encoding = "utf8")
print(by)
print(type(by)) # <class 'bytes'>
Link:https://www.cnblogs.com/farwish/p/13219028.html