python的字符串内建函数7

时间:2026-02-14 08:35:45

1、string.isupper():如果字符串中区分大小写的字符都是大写,则返回True。

python的字符串内建函数7

python的字符串内建函数7

2、string.isupper():如果字符串中区分大小写的字符不都是大写,则返回False。

python的字符串内建函数7

python的字符串内建函数7

3、string.join(seq):以字符串作为分隔符,将序列中所有字符串元素合并为一个新的字符串。

python的字符串内建函数7

python的字符串内建函数7

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

python的字符串内建函数7

python的字符串内建函数7

© 2026 五度知识库
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com