[Tutor] how do I input " as part of a string?
Robert H. Haener IV
humbolt at comcast.net
Fri Jul 13 19:51:41 CEST 2007
elis aeris wrote:
> this one doesn't work; did I misread your string?
>
> f = open("data.ini","w")
>
> title = "taitle"
>
> f.write('title is \"%title\"\n ')
>
>
> f.close()
Yes, you misread my string. The correct form of the above would be as follows:
f = open("data.ini","w")
title = "taitle"
f.write('title is \"%s\"\n' % title)
f.close()
-Robert
More information about the Tutor
mailing list