[Tutor] File IO
Kent Johnson
kent37 at tds.net
Tue Aug 29 23:15:19 CEST 2006
Amadeo Bellotti wrote:
> Ok im trying to create a file that the user chooses the name of and print a
> varible that is a string to the text file. but for some reason whne i do
> this code:
>
> FILE = open(filename, "w")
> FILE.write(puzzleanswers)
> FILE.close()
>
> it doesnt write anything does anyone know how to fix it so it works?
I would
print filename
print puzzleanswers
to make sure you know what should happen.
Kent
More information about the Tutor
mailing list