Run
mystring = 'welcome \t\t to python \n\n examples' correctedstring = " ".join(mystring.split()) print(correctedstring)
Output