Ava:

On an old typewriter when you slapped that mechanical arm two separate
but related things happened.

1) the page advanced to the next line of text.
2) the carriage was returnedt to the beginning of the line of text.

If you were careful about the way you slapped that mechanical arm, you
could get the page to advance without moving the carriage to the
beginning of the line.

You would get
                     stair stepped
                                         output like this

Now in the computing world, these two separate but related things can
sometimes still be dealt with individually.

strictly speaking a newline character is the command to move down to
the next line.

and a return character is the command to go to the beginning of the line.

On Windows, by convention the newline command does both.

So you likely won't see the return command much.

But there is one, and it is used on most non-windows systems.

as to your specific question, I've never actually tried to specify a
new line character like you have demonstrated.

I just use the "\n" sequence to make my new lines happen where I want.




On Fri, Dec 3, 2010 at 7:47 PM, Ashley Blackwell
<georgeandsnickerdoo...@gmail.com> wrote:
> Hello everybody, I'm new to the mailing list so I'm pretty sure I'll have
> lots of questions:)
>
> It's a very basic question I have and everybody might look at this
> question and say, "Wow, she reallly doesn't get it?" But oh well. Here's my
> question: I'm in Chapter 2 of my Python Programming Third Editition book.
> I've gotten to the section of the chapter where it talks about a "newline
> character. Exactly what is a newline character? I keep reading the same
> section of the book and I'm just not really understanding. Here's the code
> that the book uses to explain the newline character:
>
> print("Here", end="  ")
> print("it is...")
>
> The book says that I can specify that a space be the final character printed
> instead of a newline. In the first print() statement I specify that a space
> be the final string printed. So the text "Here" appears but no newline
> character. The next print() statement prints the text "it is"..." right
> after the space following the final "e" in the "Here" text. You do it by
> passing a space to the end parameter of the print() function with the code
> end"  ".
>
> My Operating System is Windows 7 and the Python version is 3.1.3. That's it.
> Thanks to anybody who responds to my question.
>
> --
> Ava Durand
>
> _______________________________________________
> Tutor maillist  -  tu...@python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to