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