s.capitalize()
make the first character have upper case and the rest lower case.
s.center(width, fillchar=None)
Padding is done using the specified fill character (default is a space).
s.count(sub, start=None, end=None)
从一个范围内统计某str出现的次数
s.encode(encoding='UTF-8', errors='strict')
encode() 方法以指定的编码格式编码字符串,默认编码为 'utf-8'。将字符串由string类型变成bytes类型
s.endswith(suffix, start=None, end=None)
Return True is s ends with the specified suffix, False otherwise.
s.expandtabs(tabsize=8)
将字符串中包含的\t 转换成tabsize个空格
s.find(sub, start=None, end=None)
s.index(sub, start=None, end=None)
Like s.find() but raise ValueError when the substring is not found
s.isalnum()
至少一个字符,且都是字母或数字才返回True
s.isalpha()
至少一个字符,且都是字母才返回True
s.isdecimal()
Return True if there are only decimal characters is S
s.isdigit()
s.isidentifier()
字符串为关键字返回true