Python2教程python文本 去掉字符串前后空格 python文本 去掉字符串前后空格 场景: 去掉字符串前后空格 可以使用strip,lstrip,rstrip方法 >>> a="abc".center (30) >>> a ' ... AI君 4周前 (02-26) 10℃ 0喜欢