# -*- coding: utf-8 -*-
def trim(s):
while s[:1] ==' ':
return trim(s[1:])
while s[-1:] ==' ':
return trim(s[:-1])
return s
Sign in to make a reply
好汉饶命我善意第三人
# -*- coding: utf-8 -*-
def trim(s):
while s[:1] ==' ':
return trim(s[1:])
while s[-1:] ==' ':
return trim(s[:-1])
return s