Split string using a newline delimiter with Python
https://stackoverflow.com/questions/22042948/split-string-using-a-newline-delimiter-with-python
WebIf you want to split only by newlines, you can use str.splitlines(): Example: >>> data = """a,b,c ... d,e,f ... g,h,i ... j,k,l""" >>> data 'a,b,c\nd,e,f\ng,h,i\nj,k,l' >>> data.splitlines() ['a,b,c', 'd,e,f', 'g,h,i', 'j,k,l']
DA: 84 PA: 81 MOZ Rank: 90