On Tue, Sep 1, 2009 at 7:46 AM, Sander Sweers wrote:
> 2009/9/1 Luke Paireepinart :
> txt = "Hi how are you?"
> " ".join(txt.strip().split())
> > 'Hi how are you?'
>
> txt.strip() only remove leading and trailing white space so does
> nothing in your example.
It removes newline
On Mon, Aug 31, 2009 at 06:43:29PM -0700, Ishan Puri wrote:
>
>Hello,
>I have 2 plain text documents that have uneven spacing. I need to
>make these single spaced between lines and between words. Basically I
>need to get them to be equal character length after I abridge the
>
On Mon, Aug 31, 2009 at 9:43 PM, Ishan Puri wrote:
> Hello,
> I have 2 plain text documents that have uneven spacing. I need to make
> these single spaced between lines and between words. Basically I need to get
> them to be equal character length after I abridge the uneven spacing.
I don't kn
2009/9/1 Luke Paireepinart :
txt = "Hi how are you?"
" ".join(txt.strip().split())
> 'Hi how are you?'
txt.strip() only remove leading and trailing white space so does
nothing in your example. However it works because txt.split() removes
the excessive white space between the tex
>>> txt = "Hi how are you?"
>>> " ".join(txt.strip().split())
'Hi how are you?'
On Tue, Sep 1, 2009 at 3:43 AM, Ishan Puri wrote:
> Hello,
> I have 2 plain text documents that have uneven spacing. I need to make
> these single spaced between lines and between words. Basically I need
Hello,
I have 2 plain text documents that have uneven spacing. I need to make
these single spaced between lines and between words. Basically I need to get
them to be equal character length after I abridge the uneven spacing. In Python
there is probably one simple command for this for a text