Python quote in cgi
Erik Max Francis
max at alcyone.com
Tue Sep 24 02:45:00 CEST 2002
> Hi, this might have been discussed b4,
> can someone clarify for me, when writing cgi script in python,
> does ' = """
> print """<a href="index.html">Main</a>"""
> print '<a href="index.html">Main</a>'
> are they both the same?
Yes. Triple quotes allow you to embed either form of single-character
quote in them, and additionally triple quotes can span multiple lines
(though in your example they don't).
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/ \ Ride / Ride this wave of mine
Erik Max Francis' bookmarks / http://www.alcyone.com/max/links/
A highly categorized list of Web links.
More information about the Python-list