摘要: 序号方法及描述 1capitalize()将字符串的第一个字符转换为大写 2center(width, fillchar) 返回一个指定的宽度 width 居中的字符串,fillchar 为填充的字符,默认为空格。 3count(str, beg= 0,end=len(string))返回 str 阅读全文
posted @ 2017-06-07 22:51 村口王铁匠 阅读(657) 评论(0) 推荐(0) 编辑
摘要: python字符串常用内置方法 定义: 字符串是一个有序的字符的集合,用与存储和表示基本的文本信息。 python中引号中间包含的就是字符串。 s1='hello world' s2="hello world" s3="""hello world""" s3='''hello world''' 补充 阅读全文
posted @ 2017-06-07 20:19 村口王铁匠 阅读(607) 评论(0) 推荐(0) 编辑