Run
mystring = ' python examples ' cleanstring = mystring.strip() # before strip print(mystring) print(len(mystring)) # after string print(cleanstring) print(len(cleanstring))
Output