parse a csv file into a text file

Dave Angel davea at
Thu Feb 6 12:35:20 CET 2014

 Zhen Zhang <zhen.zhang.uoft at> Wrote in message:

> I am currently running python 2.7.
> Yes, i thought there must be a print function in python like fprint in C++ that allows you to print into a file directly.
> But i google about "print string into text file" I got answers using f.write() instead. :)
> -- 
In python 2.x,
Instead of 
       f.write (a + " " + b)
you can use
       print >> f, a, b


More information about the Python-list mailing list