def trim(s): if s[:1]==' ': s=s[1:] if s[-1:]==' ': s=s[:-1] return sif trim(' a bs ')!=' a bs': print('false')