- s.isdigit() Return True if all characters in S are digits
- s.islower() Return True if all cased characters in S are lowercase
- s.isspace() Return True if all characters in S are whitespace
s.istitle() 如果字符串中所有的单词拼写首字母是否为大写, 且其他字母为小写则返回 True, 否则返回 False.
- s.isupper()
- s.isalpha()
- s.isalnum()
- s.strip(s.rstrip()
- s.lstrip()
- s.split()
- s.rsplit()
- s.splitlines()
- s.index()
- s.rindex()
- s.find()
- s.rfind()
- s.ljust()
- s.rjust()
- s.partition()
- s.rpartition()
- s.capitalize()
- s.center()
- s.startswith()
- s.endswith()
- s.count()
- s.join()
- s.decode()
- s.encode()
- s.swapcase(
- s.lower()
- s.upper()
- s.title()
- s.translate(
- s.expandtabs()
- s.replace()
- s.format()
- s.zfill()
来源: http://www.bubuko.com/infodetail-2520077.html