python的字符串内建函数9

 时间:2026-02-16 01:01:07

1、string.maketrans(a, b):用于字符映射的转换,第一个参数表示需要转换的字符,第二个参数表示转换的目标。

python的字符串内建函数9

python的字符串内建函数9

2、string.partition(str):从str出现的第一个位置起,把字符串分成一个3元素的元组(a,str,b)。

python的字符串内建函数9

python的字符串内建函数9

3、string.partition(str):如果字符串中不包含str,则元组后2个元素为空。

python的字符串内建函数9

python的字符串内建函数9

4、string.rjust(长度):返回一个原字符串右对齐,并使用空格填充至指定长度的新字符串。

python的字符串内建函数9

python的字符串内建函数9

  • python的字符串内建函数8
  • python的字符串format函数
  • python的字符串内建函数1
  • python的字符串内建函数4
  • python的字符串内建函数3
  • 热门搜索
    四川腊肠的做法 字体大小怎么调 邓禄普轮胎怎么样 佛手瓜的做法 豆芽菜的做法 米糊的做法用豆浆机 炖肉的家常做法 岑怎么读 啖怎么读 烤鱼做法