python的字符串内建函数9

 时间:2026-04-29 04:38:16

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
  • 热门搜索
    鞠躬的意思 心如止水是什么意思 性情中人是什么意思 代理是什么意思 board是什么意思 卫生间用什么门好 小鲜肉什么意思 panda是什么意思 指甲剪什么牌子好 慎独是什么意思