python 模組fnmatch
fnmatch 模組下的 fnmatch() 函式要求兩個引數:檔名,以及檔名模式,返回的是布林值。檔名模式中,支援 * 符號匹配任意字元。結合列表生成式,我們就可以快速過濾出符合條件的檔名了。
from fnmatch import fnmatch
path='...'
files = os.listdir(path)
deps = [i for i in files if fnmatch(i, "*共同內容.xlsx")]
print(deps)
相關文章
- 每週一個 Python 模組 | fnmatchPython
- python 模組:itsdangerous 模組Python
- Python模組:time模組Python
- Python模組之urllib模組Python
- python模組之collections模組Python
- Python 模組Python
- [Python模組學習] glob模組Python
- Python中模組是什麼?Python有哪些模組?Python
- Python Execl模組Python
- Python mongoHelper模組PythonGo
- Python——JSON 模組PythonJSON
- [Python] pipe模組Python
- Python - 模組包Python
- python——typing模組Python
- Python functools 模組Python
- Python pymsql模組PythonSQL
- Python:requests模組Python
- Python模組reloadPython
- python之模組Python
- 15 Python模組Python
- python–inspect模組Python
- python random模組Pythonrandom
- python Subprocess 模組Python
- Python:pathlib模組Python
- python APScheduler模組Python
- Python webargs 模組PythonWeb
- Python模組(module)Python
- Python-模組Python
- python collections模組Python
- python–模組之random隨機數模組Pythonrandom隨機
- python–模組之os操作檔案模組Python
- Python基礎12(模組與datetime模組)Python
- Python常用模組(random隨機模組&json序列化模組)Pythonrandom隨機JSON
- Python 內建模組:os模組Python
- python模組之configparserPython
- python的logging模組Python
- python模組之hashlibPython
- python模組詳解Python