On Wed, Aug 19, 2009 at 5:54 AM, Alan Gauld<alan.gauld at btinternet.com> wrote: > Lots of ways to do it. The simplest is to read the variables line by line, > so, in pseudo code: > > while infile not empty > a = f.readline() > b = f.readline() > c = f.readline() > outfile.write("%s,%s,%s" % (a,b,c) ) You will need to strip newlines from a and b. Kent