序列类型的方法

一、列表的方法

1.列表增加元素的方法(append、insert、extend):

 

2.列表删除元素的方法(clear、pop、remove):

 

3.列表查找元素的方法(index、count):

4.列表的其他方法(copy、reverse、sort):

二、字符串的方法

1.字符串查找元素的方法(index、count、find):

2.字符串修改的方法(split):

3.字符串替换的方法(replace):

replace(old,new[,count])

replace会将字符串中指定的字符替换掉,可以确定替换的次数

4.字符串拼接的方法

 

 

posted @ 2018-07-26 18:13  lk_hacker  阅读(110)  评论(0编辑  收藏  举报