def trim(s): if s[0]!=' ' and s[-1]!=' ': print(s) if s[0]==' ': s=trim(s[1:]) if s[-1]==' ': s=trim(s[:-1]) s=str(input()) trim(s)
Sign in to make a reply
虫二YCY
-- coding: utf-8 --
def trim(s): if s[0]!=' ' and s[-1]!=' ': print(s) if s[0]==' ': s=trim(s[1:]) if s[-1]==' ': s=trim(s[:-1]) s=str(input()) trim(s)