Str Python, Definition and Usage The strip() method removes any leading, and trailing whitespaces.