1. Consider using the glob2 third-party library to generate a list of filenames to iterate through.
2. Use a "with" statement to create a new text file and then iterate through the file list inside that "with"statement and open andread existing file contentsin each iterationand write them to new text file.