[top] / posixpath / splitext
splitext(p)
Split the extension from a pathname. Extension is everything from the last dot to the end. Returns "(root, ext)", either part may be empty.