With Python I know that the \"\\n\" breaks to the next line in a string, but what I am trying to do is replace every \",\" in a string with a \'\\n\'. Is that possible? I am kin
Try this:
text = 'a, b, c' text = text.replace(',', '\n') print text
For lists:
text = ['a', 'b', 'c'] text = '\n'.join(text) print text