On Sat, Dec 18, 2010 at 8:13 PM, Hugo Arts <hugo.yo...@gmail.com> wrote:
> On Sun, Dec 19, 2010 at 4:42 AM, Lea Parker <lea-par...@bigpond.com> wrote:
>> I am having problems working out what I have done incorrectly. The game over
>> block writing should stay on the same line but the bottom half of the word
>> over comes up next to the top half of the word over. Hope that makes sense.
>
> It's the backslashes.
>
> A backslash at the end of a line means to disregard the newline. You
> need to "escape" the backslash with another backslash. See here:
>
>>>> print """this string \
> ... won't have a newline, or a slash in it"""
> this string won't have a newline, or a slash in it
>>>> print """this string \\
> ... will"""
> this string \
> will
>
> The R ends in backslashes, so you need to double those up.


correct me if i'm wrong, but speaking of R, i think putting an 'r' or
'R' in front of the opening triple quotes to turn it into a raw string
will make it so that you *wouldn't* have to double everything up.

by the way... welcome to Python!! :-)

cheers,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
"Python Fundamentals", Prentice Hall, (c)2009
    http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to