Last active
April 2, 2017 19:55
-
-
Save romach/7e9bd6d46c8de03d41c46ccae86956e3 to your computer and use it in GitHub Desktop.
Extract extension from filename
This file contains hidden or 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 | |
filename = os.path.splitext('/path/to/somefile.ext')[0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment