The strip Method in Python: Removing Characters from Both Ends of a String
Returns a copy of the string with specified characters removed from both ends.
strip([chars])
chars=None-- a string containing characters to be removed. If not specified, whitespace characters are removed. This is a list of characters to be removed, not a prefix or suffix.
'abca'.strip('ac') # 'b'