os.path

Source code: os/path.seq

os.path.splitext(p: str)

Split the extension from a pathname. Extension is everything from the last dot to the end, ignoring leading dots. Returns “(root, ext)”; ext may be empty.