Difference between " and '

Benjamin Niemann pink at odahoda.de
Thu Jul 21 14:08:59 EDT 2005


b83503104 at yahoo.com wrote:

> Hi,
> 
> Can someone tell me the difference between single quote and double
> quote?
There is none. Except that in a double quoted string, single quotes don't
have to be escaped and vice versa, sometimes one of the two forms saves you
some backslashes:

"That's my house" == 'That\'s my house'
"You say: \"Hello\"" == 'You say: "Hello"'


-- 
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de/



More information about the Python-list mailing list