1)str.strip([char])  用于移除指定的字符或字符序列(默认为空格和换行符)

2)str.replace(old,new [,max])  用于替换 max为最多替换次数

  http://www.runoob.com/python/att-string-replace.html

相关文章: