In this other question, the votes clearly show that the os.path.splitext function is preferred over the simple .split(\'.\')[-1] string manipulatio
splitext() does a reverse search for '.' and returns the extension portion as soon as it finds it. split('.') will do a forward search for all '.' characters and is therefore almost always slower. In other words splitext() is specifically written for returning the extension unlike split().
(see posixpath.py in the Python source if you want to examine the implementation).