Function
posixpath.splitext

Signature

splitext(p)

Documentation String

Split the extension from a pathname. Extension is everything from the last dot to the end. Returns "(root, ext)", either part may be empty.