[Tutor] Escaping double quotes

Tim Johnson tim at johnsons-web.com
Thu Dec 8 01:56:22 CET 2005


I must be having a Senior Moment here, but the following
baffles me:
>>> label = 'this is "quoted"'
>>> label.replace('"','\"')
'this is "quoted"'
## This works
>>> label.replace('"','\'')
"this is 'quoted'"

What am I missing here?
thanks
tim

-- 
Tim Johnson <tim at johnsons-web.com>
      http://www.alaska-internet-solutions.com


More information about the Tutor mailing list