human
Is there a string-collapse library function in python?
assistant
Here is some code to split string `my_string` on white spaces

""" """.join(my_string.split())

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.