hancock at anansispaceworks.com
Sat Dec 11 07:52:34 CET 2004
On Wednesday 01 December 2004 04:20 pm, Anoop Rajendra wrote:
> doesnt work. Its definately a problem with one of the million
> backslashes and quotes present, but I'm not able to figure it out.
> What am I doing wrong?
Honestly, I'm not sure, but try the following:
1) Paste the questionable string onto a print statement (in the
interactive interpreter), and get python to tell you what it made
of what you wrote:
2) Try using a "raw string", which won't try to interpret the backslashes:
3) Use triple-quotes (as I did above) instead of escaping your quotation
marks: in Python you can actually quote with 'a', "a", '''a''', or """a""". The
triple quotes interpret newlines literally, but they also interpret both
single and double quotation marks as literal characters, which can be
That should get you there with a little tinkering.
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
More information about the Python-list