human
Is there a function in Python to split a string without ignoring the spaces?
assistant
Here is some code to split a string `mystring` considering the spaces ' '

mystring.replace(' ', '! !').split('!')

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