<human>:  split a string in python
<bot>: Here is some code to split string `a` using new-line character '\n' as separator

a.rstrip().split('\n')

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