def trim(s): if s[:1] == ' ': return trim(s[1:]) if s[-1:] == ' ': return trim(s[:-1]) else: return s
Sign in to make a reply
崔力升iManuel
def trim(s):
if s[:1] == ' ': return trim(s[1:]) if s[-1:] == ' ': return trim(s[:-1]) else: return s