glob

Match files using the patterns the shell uses, like stars and stuff.

github

import glob
for name in glob.glob('dir/*[0-9].*'):
    print name
    原文作者:梁新彦
    原文地址: https://www.jianshu.com/p/9f3cf4f04d80
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞