import os
os.path.basename(filePath)
basename_without_ext = os.path.splitext(os.path.basename(filepath))[0]
More than 1 year has passed since last update.
Python get filename from path, without extension
Last updated at Posted at 2022-09-22
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme