摘要: Python2编码 str和unicode str和unicode都是basestring的子类。严格意义上说,str其实是字节串,它是unicode经过编码后的字节组成的序列。对UTF-8编码的str'苑'使用len()函数时,结果是3,因为utf8编码的'苑' == '\xe8\x8b\x91' 阅读全文
posted @ 2018-03-13 22:17 __Alex 阅读(174) 评论(0) 推荐(0)