0.字符串特点

不可随意更改
用’ ‘," ",’’’ ‘’'表示

1.切片操作

类似于列表与元组
str1 = ‘lubenwei’
str1[:] = ‘lubenwei’
str1[1:] = ‘ubenwei’
str1[:5] = ‘luben’

2.各种操作方法
[Python]自学笔记5:字符串[Python]自学笔记5:字符串[Python]自学笔记5:字符串

相关文章: