How to display filenames of word documents in a folder using python?
How to display filenames of word documents in a folder using python? Question: I want to display the filenames of word document present in a specified path using python. Asked By: JUSTIN || Source Answers: this could work for you: for file in os.listdir(PATH): if file.endswith(“.doc”) or file.endswith(“.docx”): print(file) Answered By: sxeros It could be …