日々精進

新しく学んだことを書き留めていきます

pythonで特定のDirectoryのファイルをすべて処理する

以下のようにos.listdirを使うとできる。

        for f in os.listdir(f"{ROOT_PATH}/test/data"):
            print(f)

参考:

stackoverflow.com