string = "Welcome to Python" new_str = "".join(string.split(" ")) print(new_str) # "WelcometoPython"
sentence = ' hello apple ' sentence.strip() >>> 'hello apple'