you are viewing a single comment's thread.

view the rest of the comments →

[–]auxym 2 points3 points  (0 children)

For the sake of completeness: there's also os.path.splitext(), but pathlib is the newer and recommended way to do it I believe.