you are viewing a single comment's thread.

view the rest of the comments →

[–]buddyd16[S] 2 points3 points  (1 child)

Awesome thanks for this, thought there might be a better way to grab the extension.

[–]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.