Suppose this string:
The fox jumped over the log.
Turning into:
I've got a simple method without splitting:
a = "Lorem Ipsum Darum Diesrum!" while True: count = a.find(" ") if count > 0: a = a.replace(" ", " ") count = a.find(" ") continue else: break print(a)