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
- urlparse模組(python模組)Python
- python模組-re模組Python
- python模組 - functools模組Python
- python模組之collections模組Python
- Python 模組Python
- python模組Python
- Python 內建模組:os模組Python
- Python模組之urllib模組Python
- [Python模組學習] glob模組Python
- Python中模組是什麼?Python有哪些模組?Python
- Python的defaultdict模組和namedtuple模組Python
- Python functools 模組Python
- Python Execl模組Python
- Python webargs 模組PythonWeb
- python collections模組Python
- Python mongoHelper模組PythonGo
- Python pymsql模組PythonSQL
- Python模組(module)Python
- Python-模組Python
- Python:requests模組Python
- python random模組Pythonrandom
- Python Re模組Python
- python:time模組Python
- python:模組0Python
- Python cmd模組Python
- python colorama模組Python
- python os模組Python
- Python OS 模組Python
- 【Python】模組 fileinputPython
- Python 常用模組Python
- 【Python】Python安裝模組Python
- python–模組之random隨機數模組Pythonrandom隨機
- python–模組之os操作檔案模組Python
- Python中的模組--SSH相關模組Python
- R呼叫python模組Python