I realize this looks similar to other questions about checking if a file exists, but it is different. I\'m trying to figure out how to check that a type of
Check out os.path.splitext(path) function which says:
Split the pathname path into a pair (root, ext) such that root + ext == path, and ext is empty or begins with a period and contains at most one period. Leading periods on the basename are ignored; splitext('.cshrc') returns ('.cshrc', '').
Here's an example:
>>> os.path.splitext("./01The News from Lake Wobegon/AlbumArtSmall.jpg")
('./01The News from Lake Wobegon/AlbumArtSmall', '.jpg')
>>>