python的字符串内建函数12

2025-11-01 23:36:58

1、string.rstrip():删除字符串末尾的空格。

python的字符串内建函数12

python的字符串内建函数12

2、string.split(str):以str为分隔符泰痕切片字阅调符串。

python的字符串内建函数12

python的字符串内建函数12

3、string.split(str, num):以str为分隔符切片字符串,如果num有值,则仅痕扬棍分隔num+1个子字符串。

python的字符串内建函数12

python的字符串内建函数12

4、string.swapcase():翻转字符串中的大小写。

python的字符串内建函数12

python的字符串内建函数12

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢