Learn how to remove extra spaces from a string using regex, string splitting, a fixed point, and itertools.groupby.
itertools.groupby
Why didn't sin and tan go to the party? Just cos.