コード

import os
path, ext = os.path.splitext("C:\\Python34\\python.exe")
print(path,":",ext)

結果

C:\Python34\python : .exe