立即学习:https://edu.csdn.net/course/play/25498/304526?utm_source=blogtoedu
1、步进取反
a='123456'
a[::-1]
'654321'
2、替换 replace
str = a.replace('12','hello')
str
'hello3456'
3、出现位数
str.find('h')
0 没有返回-1
str.index('h')
0没有报异常
4、出现次数
str=‘111222333’
str.count('2')
3
5、根据规律分割
str='','',''
strsplit('')
添加 list.append()
插入 list.inster()
覆盖list[下标]=(value)
删除 list.pop()