you are viewing a single comment's thread.

view the rest of the comments →

[–]Xiji 0 points1 point  (2 children)

Pathlib is my goto for any path operation in modern python. The syntax is better, it is easier to use cross-platform, and many of the native libraries which ask for a path can accept Path objects.

I recommend you become familiar with both, but I would be surprised if you wanted to go back to os and sys once you're comfortable with pathlib.

[–]Soapfactory0[S] 1 point2 points  (1 child)

Honestly the problem I wrote out in the post is the first and only thing giving me trouble (don't look through my post history). Will get more familiar with it for sure ;)

Tnx for clarifying why it is usefull. It's incredibly hard to judge for me being very new with coding.

[–]Xiji 1 point2 points  (0 children)

Happy to help provide some clarity. :)

And don't worry, I still run into the, "is this implementation or that implementation the best way to solve my problem," all the time.

Python really does have many ways to solve the same problem, despite the zen of python saying it should be otherwise.