advanced code snippet search
kennym on 10/17/10
python replace text
# Given some text with newlines:text = "hello\nworld\n!!!" # Add a tab before every newline:"\t" + text.replace("\n", "\n\t")
Report this snippet
You need to login to post a comment.