python separate string by newline