日々精進

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

2017-01-22から1日間の記事一覧

pythonであるフォルダにあるファイルすべてを処理する

AI

os.listdirを使う。 from os import listdir from os.path import isfile, join onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] 参考: stackoverflow.com