If there are spaces at the beginning or end of a string, we should trim the strings to eliminate spaces. Strip method can be used to do this task: There are also lstrip and rstrip methods to delete spaces before and after, respectively. Split Sometimes strings carry more than one piece ...