remove extion from filename python code example Example: strip file extension python import os print(os.path.splitext("/path/to/some/file.txt")[0])