Re: escaping quotes
- From: "Fredrik Lundh" <fredrik@xxxxxxxxxxxxxx>
- Date: Tue, 28 Feb 2006 20:00:41 +0100
John Salerno wrote:
I'm reading through the tutorial and found this in section 3:
>>> '"Isn\'t," she said.'
'"Isn\'t," she said.'
Why doesn't the escape sequence work in this case?
because the interactive prompt echos the result back to you as
a Python literal, where possible. compare
'"Isn\'t," she said.''"Isn\'t," she said.'
with
"Isn't," she said.print '"Isn\'t," she said.'
(this is explained a little later in the chapter you're reading)
</F>
.
- Follow-Ups:
- Re: escaping quotes
- From: John Salerno
- Re: escaping quotes
- References:
- escaping quotes
- From: John Salerno
- escaping quotes
- Prev by Date: Re: Best python module for Oracle, but portable to other RDBMSes
- Next by Date: Re: Numerical solver
- Previous by thread: escaping quotes
- Next by thread: Re: escaping quotes
- Index(es):