def trim(s): if not isinstance(s, str): raise TypeError('参数类型错误,请输入字符串') while s[0] == ' ': s = s[1:] while s[-1] == ' ': s = s[:-1] return s
Sign in to make a reply
浪人桃