while s[:1] == " ": s = s[1:] while s[-1:] == " ": s = s[:-1] return s
有个问题,为什么是s[-1:]不是s[-2:]呢?
看得太不仔细了……明白了
Sign in to make a reply
毛球的毛