数据类型—字符串

字符串:git

                 字符串是一个有序字符的集合,用于存储和表示基本的文本信息orm

字符串的切片:ip

     a = 'red blue"字符串

     a.count("e")it

>>>2form

    a.count("e",2,7)集合

>>>0di

 

 

stripco

 

a = "                alex                    "join

a.strip()

 

replace 

a = " my score is 580 "

a.replace("580","630")

 

查:find      index      count

删:字符串不可变,不能删除

改:replace    upper    lower   casefold     swapcase   strip    split 

格式化: format    rjust   ljust   join 

判断:  isdigital   startwith   endwith 

相关文章
相关标签/搜索