PyDocs

Nav

File and Directory Access

splitext

os.path

function (source)
  • splitext(path, /)
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.
Changed in 3.6
  • 3.6: Accepts a path-like object.
1 Example
>>> splitext('bar')
('bar', '')
from the Python docs
See Also
No see-alsos for os.path/splitext
0 Notes
No notes for splitext