python去除空格和换行符的方法 2018-02-05 703 浏览 5 点赞 一、去除空格 strip() " xyz ".strip() # returns "xyz" " xyz ".lstrip() # returns "xyz " " xyz ".rstrip() # returns " xyz" " x y…