start = 0
end = len(s)
while start < end and s[start] == ' ':
start += 1
while start < end and s[end - 1] == ' ':
end -= 1
return s[start:end]
Sign in to make a reply
。
start = 0
end = len(s)
while start < end and s[start] == ' ':
start += 1
while start < end and s[end - 1] == ' ':
end -= 1
return s[start:end]