I am supposed to write the data from three existing files to a single file in python. I faced the error "TypeError: coercing to Unicode: need string or buffer", file found. My three existing files are e, g and m and I made a file named results for writing my data from those three mentioned existing files. I really appreciate for any help
filenames= [e,g,m] with open(results, "w") as outfile: for file in filenames: with open(file) as infile: for line in infile: outfile.write(line)