import docx, os def readDocx(fileName): doc = docx.Document(fileName) content = '\n'.join([para.text for para in doc.paragraphs]) return content def main(rootdir, value): fileList = os.listdir(rootdir) for each in fileList: filePath = os.path.join(ro…