def trim(s): while len(s) != 0 and s[0] == ' ': s = s[1:]
while len(s) !=0 and s[-1] == ' ': s = s[:-1] return s
Sign in to make a reply
卡哇伊的球球
def trim(s): while len(s) != 0 and s[0] == ' ': s = s[1:]