... pathlib import Path. rootdir = 'path/to/dir'. for path in Path(rootdir).iterdir ... 最後,您可以使用 glob.glob 函數,它返回與指定模式匹配的路徑名列表的迭代器 ...
確定! 回上一頁