Skip to content

Commit

Permalink
fix minor syntex error
Browse files Browse the repository at this point in the history
  • Loading branch information
llinjupt committed Jul 17, 2019
1 parent 27d32e8 commit 69d326e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions string.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
字符串处理
================

字符串(str)是 Python 中最常用的数据类型,可以使用单引号或双引号来创建字符串。

注意:
- Python不支持单字符类型,单字符在 Python 中也是作为一个字符串使用。
字符串(str)是 Python 中最常用的数据类型,可以使用单引号或双引号来创建字符串。注意:

- Python不支持单字符类型(对应 c 语言中的 char),单字符在 Python 中也是字符串类型。
- 字符串是不可变类型,即无法直接修改字符串的某一索引对应的字符,需要转换为列表处理。可以认为字符串是特殊的元组类型。

创建字符串变量
Expand Down Expand Up @@ -1596,6 +1594,3 @@ bytes() 中的编码意为对参数进行编码得到 bytes 对象,str() 中
>>>
1
b'STRING'

0 comments on commit 69d326e

Please sign in to comment.