How to get the filename without the extension from a path in Python?
For instance, if I had "/path/to/some/file.txt", I would want "
"/path/to/some/file.txt"
"
the easiest way to resolve this is to
import ntpath print('Base name is ',ntpath.basename('/path/to/the/file/'))
this saves you time and computation cost.