python去除字符串首尾空格

strip方法用于去除字符串首尾空格

例子:

a = " abc "
a.strip() # abc
原文地址:https://www.cnblogs.com/luguankun/p/11901948.html