python 统计目录下文件匹配并计数

talk is cheap,show you the code:python import fnmatch import os def count_files(directory, prefix_list): lst = os.listdir(directory) cnt_list = [len(fnmatch.filter(lst, '*'+x)) for x in prefi
相关文章
相关标签/搜索