I need to delimit the string which has new line in it. How would I achieve it? Please refer below code.
Input:
data = \"\"\"a,b,c d,e,f g,h,i j,k,l\"
str.splitlines method should give you exactly that.
>>> data = """a,b,c ... d,e,f ... g,h,i ... j,k,l""" >>> data.splitlines() ['a,b,c', 'd,e,f', 'g,h,i', 'j,k,l']