摘要: 编码问题 python 中存在两种编码 bytes 和 unicode,分别使用 b''和 u''显示指定 使用 bytes 编码,在计算字符串长度时,看的是字节长度,而不是实际长度;而 unicode 没有这个问题 encode 操作将 unicode 转为 bytes;decode 操作将 by 阅读全文
posted @ 2020-05-19 09:41 HudsonHan 阅读(144) 评论(0) 推荐(0)