字符串
>>> "mike"
'mike'
>>> 'green river shcool'
'green river shcool'
>>> 'hello,'mike!''
'hello,"mike!"'
>>> 'hello,'mike!''
File "<stdin>", line 1
'hello,'mike!''
^
SyntaxError: invalid syntax字符串转义
>>> words = "Hello!\nHi!\tHow are you?"
>>> print(words)
Hello!
Hi! How are you?多行字符串
下标索引
字符串切片
字符串连接
截取字符串
最后更新于