主页
Python
Python fnmatch 模块
demo_ref_module_fnmatch_basic
运行 ❯
×
更改方向
保存代码
更改主题
import fnmatch names = ["Emil.txt", "Tobias.py", "Linus.txt"] print(sorted(fnmatch.filter(names, "*.txt")))
['Emil.txt', 'Linus.txt']