python学习-Python基本数据类型
def capitalize(self): """ 首字母变大写 """ def center(self, width, fillchar=None): """ 内容居中,width:总长度;fillchar:空白处填充内容,默认无 """ def count(self, sub, start=None, end=None): """ 子序列个数 """ def decode(self, encoding=None, errors=None): """ 解码 """ def encode(self, encoding=None, errors=None): """ 编码,针对unicode """ def endswith(self, suffix, start=None, end=None): """ 是否以 xxx 结束 """ def expandtabs(self, tabsize=None): """ 将tab转换成空格,默认一个tab转换成8个空格 """ def find(self, sub, start=None, end=None): """ 寻找子序列位置,如果没找到,返回 -1 """ def format(*args, **kwargs): # known special case of str.format """ 字符串格式化,动态参数