[Tutor] Simple text file processing using fileinput module. "Grabbing successive lines" failure

Alan Gauld alan.gauld at btinternet.com
Mon Jul 2 19:54:14 CEST 2012


On 02/07/12 18:39, David Rock wrote:

> Essentially, your problem isn't with using fileinput, it's with how you
> handle each line that comes in.

The immediate problem is with mis-using fileinput.
But once you solve that you then have to deal with the
other issues David raises.

Once more I recommend the csv module...

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





More information about the Tutor mailing list