[Tutor] Newline

Ashley Blackwell georgeandsnickerdoodle at gmail.com
Sat Dec 4 02:47:16 CET 2010


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*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20101203/7d9e2f48/attachment-0001.html>


More information about the Tutor mailing list