String Trim Method In Python Class