human
split a string in python
assistant
Here is some code to split a string `a` with new line character

a.split('\n')[:-1]

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