split string `a` using new-line character '\n' as separator,a.rstrip().split('\n')