python 中 str与bytes的转换
摘要:# bytes转字符串方式一 b=b'\xe9\x80\x86\xe7\x81\xab' string=str(b,'utf-8') print(string) # bytes转字符串方式二 b=b'\xe9\x80\x86\xe7\x81\xab' string=b.decode() # 第一参数
阅读全文
posted @ 2018-10-25 17:17
posted @ 2018-10-25 17:17
posted @ 2018-10-15 22:14
posted @ 2018-10-14 21:12
posted @ 2018-10-06 16:25
posted @ 2018-10-03 12:54