>>> s.strip() 'Hello World From Pankaj \t\n\r\tHi There'
sentence = ' hello apple' " ".join(sentence.split()) >>> 'hello apple'