emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] OT: Python help


From: Carsten Dominik
Subject: Re: [Orgmode] OT: Python help
Date: Tue, 20 Jul 2010 13:25:52 +0200


On Jul 20, 2010, at 1:20 PM, Puneeth wrote:

On Tue, Jul 20, 2010 at 4:43 PM, Carsten Dominik <address@hidden> wrote:

On Jul 20, 2010, at 1:03 PM, Giovanni Ridolfi wrote:

Carsten Dominik <address@hidden> 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> ")

Thanks, that does work.

- Carsten




reply via email to

[Prev in Thread] Current Thread [Next in Thread]