python中如何获取文件列表

# coding: utf-8
import os 
FindPath="E:/PythonExample"
filenames=os.listdir(FindPath) 
for name in filenames:
    filePath=os.path.join(FindPath,name)
    print(filePath)

发表评论