I'm an idiot

Matt Gerrans mgerrans at mindspring.com
Sat Jun 29 07:07:12 CEST 2002


With such a small file, I don't know why no one mentioned this:

outfile = open( r'c:\path\output.txt', 'w' )
for line in open( r'c:\path\input.txt' ).readlines():
   outfile.write( line.strip() + '\n' )
outfile.close()

(or was I not paying attention?)

- Matt

"David Griswold" <david_griswold1 at yahoo.com> wrote in message
news:Xns923BD424CF53Cdavidgriswold1netsca at 204.127.68.17...
> Thank you, everyone, that took the time to help a newbie.
>
> David
>





More information about the Python-list mailing list