标签:
代码如下:
" xyz ".strip() # returns "xyz" " xyz ".lstrip() # returns "xyz " " xyz ".rstrip() # returns " xyz" " x y z ".replace(‘ ‘, ‘,‘) # returns ",x,y,z"
Python去掉空格
原文地址:http://www.cnblogs.com/jasonkent27/p/4319615.html