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.
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.