Python Split String On Newline And Keep Newline

Viewed 4390

Is there a way to split a string containing a newline character into a list of strings where the newline character has been retained, eg.

"amount\nexceeds"

would produce

["amount\n", "exceeds"]
1 Answers
Related