Remove characters surrounding string in Python

">:MASBicudo?!".strip(":>|!?.")

Result is "MASBicudo".

This removes any of the characters from both ends of the string. Order does not matter.