def trim(s): if not len(s): return s elif s[0] != " " and s[:-1] != " ": return s while s[0] == " ": s = s[1:] while s[-1] == " ": s= s[:-1] return s
Sign in to make a reply
緣生意轉丶霜雪千年