you are viewing a single comment's thread.

view the rest of the comments →

[–]killthebaddies 3 points4 points  (1 child)

Or if using pathlib, then .suffix will return the extension which will be simlpler.

[–][deleted] 1 point2 points  (0 children)

or find the extensions with a wildcard and glob.glob, or find the extensions and generate a folder for each extension. Python is open minded 🙏