[Tutor] What's the invalid syntax? Code supplied
Nathan Pinno
falcon3166 at hotmail.com
Thu Aug 4 03:21:59 CEST 2005
Hey all,
What wrong with the following syntax?
def save_file(sitelist,filename):
out_file = open(filename,"w")
for site in sitelist.keys():
out_file.write(site+","+sitelist[site][0]+","+sitelist[site][1]"\n")
out_file.close()
It highlighted the last " if that will help any.
I can't show you the error due to the fact that the error appeared in a separate box, instead of in the IDLE window.
If you need the rest of the code, just ask. It ran perfect before I added file I/O.
Thanks in advance,
Nathan Pinno
Crew, Camrose McDonalds and owner/operator of Woffee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050803/a07a8d26/attachment-0001.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pinno, Nathan Paul.vcf
Type: text/x-vcard
Size: 630 bytes
Desc: not available
Url : http://mail.python.org/pipermail/tutor/attachments/20050803/a07a8d26/PinnoNathanPaul-0001.vcf
More information about the Tutor
mailing list