python get filename before extension code example
Example: python get filename without extension
#Using pathlib in Python 3.4+
from pathlib import Path
Path('/root/dir/sub/file.ext').stem
#Using pathlib in Python 3.4+
from pathlib import Path
Path('/root/dir/sub/file.ext').stem