Remove Trailing From Python String Manipulation Functions