Created
December 17, 2015 01:14
-
-
Save natereed/3acbe41475503fdd6e36 to your computer and use it in GitHub Desktop.
Split a filename into name and extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
basename = os.path.basename(path) | |
(root, extension) = os.path.splitext(basename) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment