文章标题
来源:互联网 发布:iphone7 二次曝光软件 编辑:程序博客网 时间:2024/06/14 02:01
def capitalize(self): """首字母变大写"""def center(self,width,fillchar=None): """内容居中,width:总长度;fillchar:空白处填充内容,默认无"""def count(self,sub,start=None,end=None): """s.count(sub[,start[,end]])->int"""def decode(self,encoding=None,errors=None): """解码"""def encode(self,encoding=None,errors=None): """编码"""def endswith(self,suffix,start=None,end=None): """是否以XXX结束"""def expandtabs(self.tabsize=None): """将tab转换为空格,默认一个tab转换为八个空格"""def find(self,sub,start=None,end=None): """寻找子序列位置,如果没有找到,返回-1"""def format(*args,**kwargs): """字符串格式化,动态参数,函数式编程"""def index(self,sub,start=None,end=None): """子序列位置,如果没有找到,报错"""def isalnum(self): """是否是字母和数字"""def isalpha(self): """是否是字母"""def isdigit(self): """是否是数字"""def islower(self): """是否小写"""def isspace(self): """是否全部是空格"""def istitle(self): """每个分割字符都是首字母大写"""def isupper(self): """判断每个字母都是大写"""def join(self,iterable): """用指定的字符串连接列表元素"""def ljust(self,width,fillchar=None): """内容左对齐,右侧填充"""def lower(self): """变小写"""def lstrip(self,chars=None): """移除左侧空白"""def partition(self,sep): """分割前中后三部分"""def replace(self,old,new,count=None): """替换"""def rfind(self,sub,start=None,end=None): """从右往左找"""def rindex(self,sub,start=None,end=None): """从右往左寻找子字符串"""def rjust(self,width,fillchar=None): """从右往左填充"""def rpartition(self,sep): """从右往左分割"""def rsplit(self,sep=None,maxsplit=None): """从右往左分割"""def rstrip(self,chars=None): """从右往左脱去空格"""def split(self,sep=None,maxsplit=None): """分割,maxsplit最多分割几次"""def splitlines(self,keepends=False): """根据换行分割"""def startswith(self,prefix,start=None,end=None): """是否起始"""def strip(self,chars=None): """移除两段空白"""def swapcase(self): """大写变小写,小写变大写"""def translate(self,table,deletechars=None): """转换,需要先做一个对应表,最后一个表示删除字符集合"""def upper(self): """大写"""def zfill(self,width): """方法返回指定长度的字符串,原字符串右对齐,前面填充0"""
阅读全文
0 0
- 文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题 文章标题 文章标题 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 文章标题
- 记录关于Liunx上的命令记录
- 滚动图片
- 重新编译python报错
- LCS最长公共子序列
- record-mr-hive
- 文章标题
- CUDA和FFMPEG硬件解码视频流
- Linux系统线上问题定位
- Arduino重置-复位
- 最大公约数,最小公倍数
- Layered windows and UpdateLayeredWindow 分层窗口
- iOS 币行(BTC 、LTC、LTH、ETC) 简介
- 623. Add One Row to Tree
- 设计模式六大原则---单一职责原则