python 获取文件夹下文件个数

import glob
# path_file_number=glob.glob('D:/case/test/testcase/checkdata/*.py')#或者指定文件下个数
path_file_number=glob.glob(pathname='*.py') #获取当前文件夹下个数
print(path_file_number)
print(len(path_file_number))

  

原文地址:https://www.cnblogs.com/mahaining/p/10257314.html