Dear All, Thanks for the prompt replies. I have now processed my file with 999 lines and it took seconds. It was beautiful.
Your advice was spot on. I have enclosed the code that I ended up with. Instead of appending it to a list, I just wrote it to another file in the corrected format. filename = "a:/calllist.csv" filename2 = "c:/calllist.csv" import string import os import re listy = [] input = open( filename, 'r') #read access input2 = open(filename2, 'w') for line in input.readlines(): line = re.sub('[\s]+', '', line) y = line x = "\n" z = y + x input2.write(z) del input del input2 Thanks again, John. _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor