import os import fnmatch ls=os.listdir(r"E:\pdf") #列出檔案夾下所有的檔案 for 檔案名 in ls: if fnmatch.fnmatch(檔案名,"[!a-z].pdf"): print(檔案名)
1.pdf
2.pdf
3.pdf
4.pdf
>>>
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/85014.html
標籤:Python
上一篇:PHPCMS 1分鐘快速搭建
下一篇:Django框架
