On Tue, Jul 20, 2010 at 4:43 PM, Carsten Dominik <domi...@uva.nl> wrote: > > On Jul 20, 2010, at 1:03 PM, Giovanni Ridolfi wrote: > >> Carsten Dominik <domi...@uva.nl> writes: >> >> >>> a python question: How do I prefix every line in a multiline string >>> with a string. For example, I would like to add "> " before all lines >>> in a string.... >> >> how about replacing "\n" with "\n > " ? > > Please show me the full line of code, I am currently editing a python script > without any knowledge of python...
my_string = "Hello\nWorld" my_new_string = my_string.replace("\n", "\n> ") HTH, Puneeth _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode