Split into lines
Splits a multiline string into a list of lines.
- Use
str.split()and'\n'to match line breaks and create a list. str.splitlines()provides similar functionality to this snippet.
Splits a multiline string into a list of lines.
str.split() and '\n' to match line breaks and create a list.str.splitlines() provides similar functionality to this snippet.