Python 字符串常用函数 1.大小写1.1全小写1.2全大写1.3首字母大写 2.去掉空格2.1去掉左空格2.2去掉右空格2.3去掉两边空格 1.大小写 1.1全小写 x.lower() 1.2全大写 x.upper() 1.3首字母大写 x.title() 2.去掉空格 2.1去掉左空格 x.lstrip() 2.2去掉右空格 x.rstrip() 2.3去掉两边空格 x.strip()