标签:seq strip swap 字母 end rip python title 大小
(仅部分)
string.strip():去除字符串首尾指定字符,默认为space
string.lstrip() string.rstrip():去掉字符串左边 右边的空格
string.split(str):以str为分隔符切片string
string.join(seq):以string作为分隔符,将seq中的元素合并为一个新的字符串
string.startswith(obj,beg=0,end=len(string)):检查字符串开头是否是obj,返回值为布尔值。如果有beg和end,在指定范围内检查
string.swapcase():翻转string中的大小写
string.title():标题化的string,首字母大写
标签:seq strip swap 字母 end rip python title 大小
原文地址:http://www.cnblogs.com/zhaoxiaoyu/p/7258395.html