On 28 srp, 14:15, Steve Holden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On 28 srp, 07:05, Zentrader <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > NEW TEXT : "Hello world;\nHello:\n\t\t\n\n\n\n\n\nHello2"
> >> If you are doing all of this to format the output i
> >>> Short_Text="n=90; if n==90:print 'ok'"
> >>> compound_lines = Short_Text.split(";")
> >>> for line in compound_lines:
> ... line = line.replace(":", ":\n")
> ... print line
> ...
> n=90
> if n==90:
> print 'ok'
A variation of this will work if the input file isn't too
compl
[EMAIL PROTECTED] wrote:
> On 28 srp, 07:05, Zentrader <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
> NEW TEXT : "Hello world;\nHello:\n\t\t\n\n\n\n\n\nHello2"
>> If you are doing all of this to format the output into columns,
>> Python's print() or write() will do this, and is eas
On 28 srp, 07:05, Zentrader <[EMAIL PROTECTED]> wrote:
> > > [EMAIL PROTECTED] wrote:
> > > > NEW TEXT : "Hello world;\nHello:\n\t\t\n\n\n\n\n\nHello2"
>
> If you are doing all of this to format the output into columns,
> Python's print() or write() will do this, and is easier as well. Some
> mor
> > [EMAIL PROTECTED] wrote:
> > > NEW TEXT : "Hello world;\nHello:\n\t\t\n\n\n\n\n\nHello2"
If you are doing all of this to format the output into columns,
Python's print() or write() will do this, and is easier as well. Some
more info on what you want to do will clear things up.
--
http://ma
On Jul 27, 11:26 am, Wildemar Wildenburger <[EMAIL PROTECTED]>
wrote:
> [EMAIL PROTECTED] wrote:
> >> If I understand you correctly you want to replace ";" by ";\n" and ":"
> >> by ":\n\t\t\t\t\t\t\t".
> >> Well guess what? The replace() method does just this. Have a read:
> >> http://docs.python.o
[EMAIL PROTECTED] wrote:
>> If I understand you correctly you want to replace ";" by ";\n" and ":"
>> by ":\n\t\t\t\t\t\t\t".
>> Well guess what? The replace() method does just this. Have a read:
>> http://docs.python.org/lib/string-methods.html>
>>
> No,that's not what I need...
> When this f
On 27 srp, 19:29, Wildemar Wildenburger <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > I have one question about string.I am trying to make an function to
> > analyze line of some text, this is my example: "HELLO;HELLO2:WORLD:",
> > if that function in this text find ";" and ":" ( in t
[EMAIL PROTECTED] wrote:
> I have one question about string.I am trying to make an function to
> analyze line of some text, this is my example: "HELLO;HELLO2:WORLD:",
> if that function in this text find ";" and ":" ( in this example will
> find both)
>
> e.g that function must return this:
>
>
On Jul 27, 8:23 am, [EMAIL PROTECTED] wrote:
> Hello,
>
> I have one question about string.I am trying to make an function to
> analyze line of some text, this is my example: "HELLO;HELLO2:WORLD:",
> if that function in this text find ";" and ":" ( in this example will
> find both)
>
> e.g that
Hello,
I have one question about string.I am trying to make an function to
analyze line of some text, this is my example: "HELLO;HELLO2:WORLD:",
if that function in this text find ";" and ":" ( in this example will
find both)
e.g that function must return this:
"HELLO;\nHELLO2:\n\t\t\t\t\t\t
11 matches
Mail list logo