Using File Extension Wildcards in os.listdir(path) - Stack ...

文章推薦指數: 80 %
投票人數:10人

Maybe the glob module can help you: import glob listing = glob.glob('C:/foo/bar/foo.log*') for filename in listing: # do stuff. Howarewedoing?PleasehelpusimproveStackOverflow.Takeourshortsurvey JoinStackOverflowtolearn,sha



請為這篇文章評分?