On Wed, Jan 7, 2009 at 4:31 AM, wormwood_3 <[email protected]> wrote:

> On point 2, say I enter:
> Enter text, 'done' on its own line to quit:
> I am a sentence. I am another sentence.
>
> I am a new paragraph.
> done
>
> What I get out is:
> I am a sentence. I am another sentence.  I am a new paragraph.
>
> But that just shows the double new lines of my new paragraph as an extra
> space. I'd like to print it out so it appears just as it was typed in, with
> appropriate newlines.

The newline character is written \n in Python, so if you replace

' '.join(user_input)

by

'\n'.join(user_input)

you should be getting what you want.



-- 
AndrĂ© Engels, [email protected]
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to