how to remove the .jpg in file name python code example
Example 1: python code to remove file extension
import os
print os.path.splitext("sample.txt")[0]
Example 2: strip file extension python
import os
print(os.path.splitext("/path/to/some/file.txt")[0])