split a string in python,a.split('\n')[:-1]