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