Peter Otten wrote: > outputFile = file('pruned_ips.txt' , 'w') > for i in include - exclude: > print >> outputFile, i, > outputFile.close() Wow! That makes a lot more sense than the list comprehension stuff. I think I'll use it. Thanks!