I have written the following script to concatenate all the files in the directory into one single file.
Can this be optimized, in terms of
idiomat
No need to use that many variables.
with open(outfilename, 'w') as outfile: for fname in filenames: with open(fname, 'r') as readfile: outfile.write(readfile.read() + "\n\n")