Using pathlib this task becomes super easy: from pathlib import Path root = Path("/path/to/your/root/dir") for file in root.glob("*.pdf"): ...
確定! 回上一頁