python字符串常用命令

+ 连接       *重复       in 包含       not  in   不包含

     str()——转换成字符串      int()——转换成整数

     len()——字符串长度       max()——找最大      min()——找最小

     n.lower()——大写改小写    n.upper()——小写改大写

  n.capitalize()——首字母改大写    n.swapcase()——大小写反转

  n.lstrip()——删左边    n.rstrip()——删右边    n.strip()——同时删两边

     n.startswith()——是不是指定开头    n.endswith()——是不是指定结尾

     n.find或n.index——从左查找    n.rfind或n.rindex——从右查找

     n.replace(a,b)——a替换成b

     n.count()——统计个数