python3 的宝藏技巧

Python used to do filesystem paths well enough, but they were always string-based. This had the advantage of familiarity for most coders because some of the initial lessons in any basic Python course involve string manipulation. However, treating paths as strings can be cumbersome for advanced operations. The pathlib
module enables Python to treat paths as objects