[Tutor] Seeking help with reading and writing files in Python

Alan Gauld alan.gauld at btinternet.com
Wed Jul 4 18:56:51 CEST 2012


On 26/06/12 19:28, Aristotle wrote:

> with an assignment that asks me to read from one file and then write to
> another file. The problem is that the file to read from has not been
> created yet.

So create it.
Any old text editor will do.
The whole point is, I believe that you are writing a program to read a 
file created by some other application, perhaps a web application or 
database reporting tool. (or in this case Notepad, say).

How the file is created is irrelevant so long as it has the data that 
you want to extract within it.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/





More information about the Tutor mailing list