Python strip() 方法用于移除字符串头尾指定的字符(默认为空格)或字符序列。
注意:该方法只能删除开头或是结尾的字符,不能删除中间部分的字符。
def strip(self, chars=None): # real signature unknown; restored from __doc__"""S.strip([chars]) -> strReturn a copy of the string S with leading and trailingwhitespace removed.返回删除前导和尾随空格的字符串S的副本。If chars is given and not None, remove characters in chars instead.如果给定chars而不是None,则改为删除chars中的字符。"""return ""
参考文章:Python3 strip()方法