Dec-16-2019, 10:01 AM
(This post was last modified: Dec-16-2019, 10:16 AM by Axel_Erfurt.)
Are the separators commas?
Whatever.
You could put them together as strings.
Whatever.
You could put them together as strings.
file1 = "/path/file1.csv" file2 = "/path/file2.csv" outfile = "/path/all_together.csv" all_together = "" with open(file1, 'r') as f: all_together = f.read() with open(file2, 'r') as f: all_together = f"{all_together}{f.read()}" with open(outfile, 'w') as f: f.write(all_together)