Answers for "how to list out files of a particular extension in a folder in python"

0

list files in directory python with extension

import glob, os
os.chdir("/mydir")
for file in glob.glob("*.txt"):
    print(file)
Posted by: Guest on April-23-2021

Code answers related to "how to list out files of a particular extension in a folder in python"

Python Answers by Framework

Browse Popular Code Answers by Language