# string to byters
a_byters = bytes(a_str,'utf-8')
a_byters = a_str.encode('utf-8')
# byters to string
a_str = a_byters.decode('utf-8')
a_str = str(a_byters,encoding='utf-8')
# string to byters
a_byters = bytes(a_str,'utf-8')
a_byters = a_str.encode('utf-8')
# byters to string
a_str = a_byters.decode('utf-8')
a_str = str(a_byters,encoding='utf-8')
本文标题:[python] string 与 byters之间的互转
本文链接:https://www.haomeiwen.com/subject/iqrpaltx.html
网友评论