isdir

毎日Python/こつこつPython

【毎日Python】Pythonで指定したディレクトリの有無を確認する方法|isdir

import os os.path.isdir('./sample/lower01') Pythonで指定したディレクトリが存在するか確認する方法です。 Pythonのosモジュールのisdirを使います。使い方はisdirの引数に存在を確...