how to get rid of the space between two words in python code example Example: python trim whitespace from end of string >>> " xyz ".rstrip() ' xyz'