def trim(s):
if s == '':
return s
else:
while s [:1] == ' ':
s= s[1:]
while s [-1:] == ' ':
s= s[:-1]
Sign in to make a reply
今天我们会在云中逃亡吗
def trim(s):
if s == '':
return s
else:
while s [:1] == ' ':
s= s[1:]
while s [-1:] == ' ':
s= s[:-1]
return s