2019年1月1日

python中字符串前的r什么意思

摘要: Python中,u表示unicode string,表示使用unicode进行编码,没有u表示byte string,类型是str,在没有声明编码方式时,默认ASCI编码。如果要指定编码方式,可在文件顶部加入类似如下代码: utf 8是一种支持中文的编码格式。 字母前加r表示raw string,也 阅读全文

posted @ 2019-01-01 13:11 eustoma 阅读(2940) 评论(0) 推荐(1)

python3 三种字符串(无前缀,前缀u,前缀b)与encode()

摘要: https://blog.csdn.net/anlian523/article/details/80504699 阅读全文

posted @ 2019-01-01 13:07 eustoma 阅读(652) 评论(0) 推荐(0)

Markdown语法

摘要: Markdown入门基础 "Link" 在Markdown状态下,设置文字加粗和倾斜 "Link" 阅读全文

posted @ 2019-01-01 11:29 eustoma 阅读(141) 评论(0) 推荐(0)

Python3 字符串前面加u,r,b的含义

摘要: u/U:表示unicode字符串 不是仅仅是针对中文, 可以针对任何的字符串,代表是对字符串进行unicode编码。 一般英文字符在使用各种编码下, 基本都可以正常解析, 所以一般不带u;但是中文, 必须表明所需编码, 否则一旦编码转换就会出现乱码。 建议所有编码方式采用utf8。 在python3 阅读全文

posted @ 2019-01-01 11:15 eustoma 阅读(2777) 评论(0) 推荐(1)

导航