outputList is a list of lists. [ [a,b,c], [d,e,f], [g,h,i] ] and I want to output it to a csv file with each list as a separate row. I'm getting this error TypeError: coercing to Unicode: need string or buffer, file found and I dont know why. Im using python 2.7 and a newish mac. Belows my code, thanks in advance
f2 = open(os.path.expanduser("~/Documents/Test/blah/outputfile.csv"))
with open(f2, 'w') as fp:a = csv.writer(fp)for row in zip(outputList) :a.writerow(row)
f2.close()