Rozszerzenie kropli Pythona

>>> print(os.path.splitext(os.path.basename("/path/to/file/hemanth.txt"))[0])
hemanth
Splendid Sandpiper