删除字符串空格方法

"   abc   ".strip()            # returns "abc"  
"   xyz   ".lstrip()           # returns "xyz   "  
"   xyz   ".rstrip()           # returns "   xyz"  
"  x y z  ".replace(' ', '')   # returns "xyz" 
原文地址:https://www.cnblogs.com/themost/p/7049291.html