human
How to get the filename without the extension from a path in Python?
assistant
Here is some code to get the filename without the extension from file 'hemanth.txt'

print(os.path.splitext(os.path.basename('hemanth.txt'))[0])

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.