一些处理变量的简单方法

①.title()       #将每个单词的首字母变为大写

②.lower()     #将全部字母变为小写

③.upper()    #将全部字母变为大写

④.strip()      #去除首尾空白

⑤.rstrip()     #去除尾部空白

⑥.lstrip()      #去除首部空白

posted @ 2018-06-22 11:32  我不会python  阅读(332)  评论(0编辑  收藏  举报